
Creating Menus
6-59
• Display a check next to the menu item when the menu is first opened by
checking
Check mark this item. A check indicates the current state of the
menu item. See the example in “Adding Items to the Context Menu” on
page 6-57. See “Updating a Menu Item Check” on page 8-38 for an example.
• Enable this item when the menu is first opened by checking
Enable this
item
. This allows the user to select this item when the menu is first opened.
If you deselect this option, the menu item appears dimmed when the menu
is first opened, and the user cannot select it.
• Specify a string for the routine, i.e., the
Callback, that performs the action
associated with the menu item. If you have not yet saved the GUI, the default
value is
'%automatic'. When you save the GUI, and if you have not changed
this field, GUIDE automatically sets the value using a combination of the
Tag field and the GUI filename. See “Menu Item” on page 8-37 for more
information about specifying this field and for programming menu items.
The
View button displays the callback, if there is one, in an editor. If you
have not yet saved the GUI, GUIDE prompts you to save it.
• Open the Property inspector, where you can change all menu properties, by
clicking the
More options button.
Associating the Context Menu with an Object
In the Layout Editor, select the object for which you are defining the context
menu. Use the Property Inspector to set this object’s
UIContextMenu property
to the name of the desired context menu. The following figure shows the
UIContextMenu property for the axes object with Tag property axes1.
Comentários a estes Manuais