ChooseSymbol() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Brings up Symbol Style picker (Symbol picker) with the specified Symbol style selected in the dialog. You can call this function from the MapBasic window in MapInfo Pro.

Return Value

String: A MapBasic Symbol clause string of the Symbol style the user selected. If user cancels the dialog, an empty string is returned.

Syntax

ChooseSymbol(symbol_clause)

symbol_clause - string. Either an MB Symbol style string or a Symbol object. If passing an empty string the Symbol Style dialog will open initially with the Current Symbol style.

Example

Passing a Symboil Object as symbol_clause :

Dim tSymbol as Symbol
tSymbol= MakeSymbol(44, 16711680, 16)  or MakeSymbol(44, RED, 16)
Print ChooseSymbol(tSymbol )

Pass symbol_clause as a string:

Print ChooseSymbol("Symbol(44, 16711680, 16)")  - initializes dialog with a red block,
      size 16 symbol from MapInfo 3.0 Compatible symbol collection

Using a Custom Symbol as a string:

Print ChooseSymbol("Symbol(" & """GLOB1-32.BMP""" & ", 255, 18, 0)")   -
      initializes dialog with the globe from custom bitmap symbols collection.

Using a Font Symbol as a string:

Print ChooseSymbol("Symbol (44,16711680,24," & """Wingdings""" & ",32,0")   -
      initializes dialog with the red mailbox from Wingdings font symbol collection.

Pass an empty string:

Print ChooseSymbol("") - Returns the current default Symbol which is typically a MapInfo
      3.0 Compatible Black Star, size 12(e.g.: Symbol (35,0,12)  ).

When function is called the Symbol Style picker will open with the Symbol style passed as Symbol_clause (e.g.: a Red Block, size 16 symbol). If user just hits OK on Symbol style dalog, a Symbol clause of Symbol(44, 16711680, 16) will be returned and shown in Message window. If user selects a different Symbol Style, Color, or Background, the new Symbol style clause will be returned and shown in Message window. If user hits Cancel on Symbol Style dialog, an empty string is returned.