Control push tool appearance and behavior
Push tools are push buttons that appear in the tool bar at the top of a figure.
uipushtool function creates a push button in a tool bar and sets any
required properties before displaying it. By changing property values, you can modify certain
aspects of its appearance and behavior. Use dot notation to refer to a specific object and
pt = uipushtool; pt.Separator = 'on';
Tooltip, specified as a character vector, string scalar, or categorical array. Use this property to display a message when you hover over the component in the running app. The tooltip does not appear when the component is disabled. If you specify this property as a categorical array, MATLAB® uses the values in the array, not the full set of categories.
In figures created with the
uifigure function, push tools and toggle
tools support multiline tooltips. To create a multiline tooltip, use the
sprintf function to insert newline characters (
in your text. For
txt = sprintf('Line 1\nLine 2');
Then set the
Tooltip property to the value returned by
In figures created with the
figure function, push tools and
toggle tools do not support multiline tooltips.
ContextMenu— Context menu
GraphicsPlaceholderarray (default) |
Setting this property has no effect on objects of this type.
ClickedCallback— Tool clicked callback
''(default) | function handle | cell array | character vector
Tool clicked callback, specified as one of these values:
A function handle.
A cell array in which the first element is a function handle. Subsequent elements in the cell array are the arguments to pass to the callback function.
A character vector containing a valid MATLAB expression (not recommended). MATLAB evaluates this expression in the base workspace.
For more information about specifying callback functions as function handles, cell arrays, or character vectors, see How to Specify Callback Property Values.
HandleVisibility— Visibility of object handle
Visibility of object handle, specified as
This property controls the visibility of the object in its parent's list of children. When an
object is not visible in its parent's list of children, it is not returned by functions
that obtain objects by searching the object hierarchy or querying properties. These
HandleVisibility property also controls the visibility of the
object’s handle in the parent figure's
Objects are valid even if they are not visible. If you can access an object, you can set
and get its properties, and pass it to any function that operates on
|The object handle is always visible.|
|The object handle is visible from within callbacks or functions invoked by callbacks, but not from within functions invoked from the command line. This option blocks access to the object at the command line, but allows callback functions to access it.|
|The object handle is invisible at all times. This option is
useful for preventing unintended changes to the UI by another
function. Set the |
Type— Type of graphics object
This property is read-only.
Type of graphics object, returned as