Type | Description | |||
String | A String expression that indicates the list of items. |
The ToString's syntax in BNF notation:
<TOSTRING> ::= <ITEMS>
<ITEMS> ::= <ITEM>["("<ITEMS>")"][","<ITEMS>]
<ITEM> ::= <NAME>[<OPTIONS>]
<OPTIONS> ::= "["<OPTION>"]"["["<OPTIONS>"]"]
<OPTION> ::= <PROPERTY>["="<VALUE>]
<PROPERTY> ::= "id"|"img"||"sep"|"blt"|"chk"|"dis"|"bld"
where the <NAME> is the name of the item. The <VALUE> tag is valid for the options "img","id","bg","fg" and
"edit", like follows:
Is there any way to get this formatted string from the control's editor? Open the control in design mode, select the Properties item in its context menu, and locate the Editor page, where you find the "Invoke Internal Editor" button, click it, and the control's Editor page is opened. Build your menu. Click an item, so it becomes focused, and press the CTRL + C, a beep should be hear. Now, open a notepad editor, and press CTRL + V, you should get the formatted string for ToString method. Click the designer, so no item is focused, and press the CTRL + C key, and so the entire menu is copied to the clipboard, as ToString syntax.
Here's how the WYSWYG editor looks like: