Purpose
Brings up Region Style picker (Combined Region Fill and Border Pen picker) with the specified Border Pen and Brush Fill styles selected in the dialog. You can call this function from the MapBasic window in MapInfo Pro.
Return Value
String: A MapBasic Pen and Brush string clause separated by a space. If user cancels the dialog, an empty string is returned.
Syntax
ChoosePenAndBrush(pen_clause <space> brush_clause)
pen_clause - string. a MapBasic Pen style string. If passing an empty string the Border part of Region Style dialog will be set initially with the Current Border Pen style.
brush_clause - string. a MapBasic Brush style string. If passing an empty string the Fill part of Region Style dialog will be set initially with the Current Brush style.
Example
Pass pen_clause and brush_clause as a single string separated with a space:
Print ChoosePenAndBrush("Pen (1,9,0) Brush (5,65535)") - Initializes Region Style
picker with Style 1E (hatch fill, no background, 1 pixel black dashed border pen)
Pass an empty string:
Print ChoosePenAndBrush("") - Returns the current default Region Style which is typically a
white solid fill with a thin black 1 pixel line (e.g.: Pen (1,2,0) Brush
(2,16777215,16777215) ).
When function is called the Region Style picker will open with the Border style passed as pen_clause (e.g.: a 1 pixel black line as initial style) along with a brush_clause (e.g.: a fill pattern with color and a background that may be visible or not). If user just hits OK on Region style dalog, these two clauses wil be returned together and shown in Message window. If user selects a different Border Style, Color, or Width, or new Fill Pattern, Color or Background, the new Pen and Brush style clauses will be returned as a concatentated string separated by a space and shown in Message window. If user hits Cancel on Region Style dialog, an empty string is returned.