Name
SelectMenuItem -- select a toggle or radio menu item (V6.0)
Synopsis
SelectMenuItem(id, item$[, detached])
Function
This function can be used to select a toggle or radio menu item. The optional argument detached specifies whether a menu strip that is attached to a display or a detached menu strip should be used. If detached is False (which is also the default), the menu strip of the display specified by id will be used. If detached is True, the menu strip specified by id will be used. In other words: If you set detached to True, you need to pass the identifier of a menu strip in id; otherwise you need to pass the identifier of a display in id.

Note that when setting detached to True your operation will never have any effect on menu strips attached to a display. Setting detached to True is typically only used with menu strips that are shown as popup menus using the PopupMenu() function. It's impossible to address display menu strips when setting detached to True because a single menu strip can be attached to multiple displays.

On AmigaOS 4 you can also pass the special value of 0 for id. In that case, the context menu of the docky will be used.

Please note that radio groups can only have one active item at a time: This means that if you select a new radio menu item using SelectMenuItem(), the previously selected radio menu item will automatically be deselected.

Inputs
id
identifier of a display or a menu strip (see above)
item$
identifier of the item inside the menu strip
detached
optional: False if id specifies a display, True if it specifies a menu strip object (defaults to False) (V10.0)

Show TOC