Purpose
Brings up Fill Style picker (Brush picker) with the specified Fill style selected in the dialog. You can call this function from the MapBasic window in MapInfo Pro.
Return Value
String: A MapBasic Brush clause string of the Brush style the user selected. If user cancels the dialog, an empty string is returned.
Syntax
ChooseBrush(brush_clause)
brush_clause - string. Either an MB Brush style string or a Brush object. If passing an empty string the Fill Style dialog will open initially with the Current Brush style.
Example
Passing a Brush Object as brush_clause :
Dim tBrush as Brush
tBrush= MakeBrush(64, CYAN, BLUE) or MakeBrush(64,65535,255)
Print ChooseBrush(tBrush )
Pass brush_clause as a string:
Print ChooseBrush("Brush(64,65535,255)")
Pass an empty string:
Print ChooseBrush("") - Returns the current default Brush which is typically a Solid White Fill (e.g.: Brush (2,16777215,16777215) ).
When function is called the Fill Style picker will open with the Fill style passed as brush_clause (e.g.: a fil tha is dark blue background with cyan forecolor and pattern 8E in style picker). If user just hits OK on Fill style dalog, a Brush clause of Brush (2,16777215,16777215) will be returned and shown in Message window. If user selects a different Fill Style, Color, or Background, the new Fill style clause will be returned and shown in Message window. If user hits Cancel on Fill Style dialog, an empty string is returned.