## WorkShop Visual Replay Command Syntax - Option Menu Operations

#### Keywords

- option - select from an option menu

#### Synopsis

        option opmenu-widget::member_widget

#### Inputs

- opmenu-widget - the name of an option menu widget
- member-widget - the name of a widget within the option menu's pulldown menu

#### 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:

- WorkShop Visual Replay Command Syntax