AppendMenu

To add more items to a menu, use the AppendMenu method. (This method should be called AppendMenuItem, but this is how it is in the Toolbox, strange but true)

AppendMenu theMenu as MenuHandle, itemText as String

theMenu Handle of a menu in which to append an item.

itemText Text to put in the menu (Max 255 chars), see more bellow.


itemText (more info):
The toolbox makes AppendMenu quite flexible via the itemText parameter. Multiple itmes can be inserted with one command by seperating items in the itemText by semi-colons (;), the following list special metacharacters that may be embended in itemText:


Char Dec Description
; 59 Item seperator

Return 13 Item seperator

^ 94 Next character specifies an icon (its resorce ID is char ASCII value+208)

! 33 Next char is "mark"; e.g. 030 = "Ã" or when next char is 0x1B, this is a submenu ID.

< 60 Next char specified style (B,I,U,O or S).

/ 47 Next char is a command key equivalent ...OR... when next char is 0x1B, this is a submenu title.

( 40 This item is disabled (dimmed)

- 45 (when firs char) "item" is a dotted line, normally used with "C"; e.g. (-

Supported platforms:
* MacOS PPC
* MacOS Carbon
* MacOS 68k

Unsupported platforms:
* Windows x86