Class LM_Menu

Version added: before 9.5
The LM_Menu class represents a list of commands. A menu by itself does not appear in the user interface - it must be attached to an LM_PopupMenu widget in order to be placed in a dialog box or toolbar. To create a new menu, you would use the LM.GUI.Menu method.
Image

The LM_Menu of 3 options is attached to the LM_PopupMenu widget

Methods of LM_Menu:

Name Returns Description Ver
AddItem AddItem(label, shortcut, msg) void Adds a new command to the bottom of the menu < 9.5
AddItemAlphabetically AddItemAlphabetically(label, shortcut, msg) void Adds a new command alphabetically to the menu < 9.5
CountItems CountItems() int32 Returns the number of commands in the menu < 9.5
FirstChecked FirstChecked() int32 Returns the id of the first checked command in the menu (starting at 0 for the first item) < 9.5
FirstCheckedLabel FirstCheckedLabel() char Returns the text label of the first checked command in the menu < 9.5
FirstCheckedMsg FirstCheckedMsg() int32 Returns the message value of the first checked command in the menu < 9.5
InsertItem InsertItem(atIndex, label, shortcut, msg) void Added in version 12 12.0
IsChecked IsChecked(msg) bool Tests whether a menu command is checked < 9.5
IsEnabled IsEnabled(msg) bool Checks the enabled status of a menu command < 9.5
ItemLabel ItemLabel(msg) char Returns the text label of a command in the menu < 9.5
RemoveAllItems RemoveAllItems() void Removes all commands from a menu, leaving the menu empty < 9.5
SetChecked SetChecked(msg, checked) void Attaches a checkmark to a menu command < 9.5
SetCheckedLabel SetCheckedLabel(label, checked) void Attaches a checkmark to a menu command < 9.5
SetEnabled SetEnabled(msg, enabled) void Enables or disables a menu command < 9.5
UncheckAll UncheckAll() void Un-checks all commands in the menu < 9.5