X-Designer Replay Command Syntax - Option Menu Operations

X-Designer Replay Command Syntax - Option Menu Operations


Keywords

Synopsis

    option opmenu-widget::member_widget

Inputs

Description

option selects an option from an option menu.

Examples

    in ApplicationShell
	cascade format_menu
	    pullright character_menu
		option character_menu::bold

The next example only selects an option if the option menu itself is sensitive to user input:

    if IsSensitive(myoptionmenu->OptionButton)
	option myoptionmenu::thisoption
    endif

If you want to check the current setting of the optionmenu (i.e. what was last selected), you simply examine the option menu menuHistory resource, for example:

    if myoptionMenu->menuHistory: select_yes
	message he said yes
    endif

Notes

An alternative method of selecting a member of an option menu is to push the option button and then push the appropriate member widget. However, we recommend use of the option syntax as it more closely mimics user actions.

See also: