User`s guide
11 Lay Out a Programmatic GUI
Property Values Description
HandleVisibility
on
, off. Default is
on.
Determines if an object’s handle is visible in
its parent’s list of children. For menus, set
HandleVisibility to off to protect menus
from operations not intended for them.
Parent
Figure handle
Handle of the context menu’s parent figure.
Position
2-element vector:
[distance from
left, distance fro m
bottom]. Default is
[0 0].
Distances from the bottom left corner of the
parent figure to the top left corner of the
context menu. This property is used only when
you programmatically set the context menu
Visible property to on.
Visible
off
, on. Default is
off
• Indicates whether the context menu is
currently displayed. While the context menu
is displayed, the property value is
on;when
the context menu is not displayed, its value
is
off.
• Setting the value to
on forces the posting of
the context menu. Setting to
off forces the
context menu to be removed. The
Position
property determines the l ocation where the
context menu is displayed.
For a complete list of properties and for more information about the properties
listed in the table, see the Uicontextmenu Properties reference page.
Create the Context Menu Object
Use the u icontextmenu function to create a context menu object. The syntax
is
handle = uicontextmenu('PropertyName',PropertyValue,... )
Theparentofacontextmenumustalwaysbeafigure. Usethecontextmenu
Parent property to specify its parent. If you do not specify Parent, the parent
is the current figure as specified by the root
CurrentFigure property.
The following code creates a figure and a context menu whose parent is the
figure.
11-82