Create toggle tool in toolbar
creates a toggle tool in the
toolbar of the current figure and returns the tt
= uitoggletoolToggleTool
object.
The current figure must be one created with the figure
function. If
the current figure does not have a child toolbar, then MATLAB® creates one in the current figure to serve as the parent. If a figure created
with the figure
function does not exist, then MATLAB creates one and calls the uitoolbar
function to create a
toolbar to serve as the parent.
Toggle tools have two states: 'off'
or 'on'
. The
state of the button changes every time you click it.
creates a toggle tool with property values specified using one or more name-value pair
arguments. Specify name-value pairs with either of the previous syntaxes.tt
= uitoggletool(___,Name,Value
)
Toolbar
objects (and their child PushTool
and
ToggleTool
objects) do not appear in figures whose WindowStyle
property is
set to 'modal'
. If a figure containing a toolbar child has its
WindowStyle
changed to 'modal'
, the toolbar child
still exists in the Children
property of the figure.
However, the toolbar does not appear while WindowStyle
is set to
'modal'
.