Name
IsMenuItemSelected -- check if a menu item is selected (V6.0)
Synopsis
result = IsMenuItemSelected(id, item$[, detached])
Function
This function can be used to check whether a toggle or radio menu item is selected or not. 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.

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)
Results
result
True if the menu item is selected, False otherwise

Show TOC