Creates a toolbar with uipushtool or
uitoggletool objects in a container object such as a figure,
uipanel or uitab.
Syntax
handle = uitoolbar
handle = uitoolbar(property, value, ...)
handle = uitoolbar(parent, property, value, ...)
Inputs
parent
Handle of a container object such as a figure,
uipanel or uitab.
Type: double | integer
property, value
createfcn
Function triggered when handle is created.
If value is a function handle, it must be
a function that takes at least two arguments: the first is the
handle and the second argument is ignored.
If value is a string,
it must represent a function handle or a function name.
If value is a cell,
it must contain the function name/function handle in the
first cell element and parameters to pass to the callback function in the
additional elements.
createfcn cannot be interrupted.
Type: cell | functionhandle | string
deletefcn
Function triggered when handle is deleted.
Type: cell | functionhandle | string
If value is a function handle, it must be
a function that takes at least two arguments: the first is the
handle and the second argument is ignored.
If value is a string,
it must represent a function handle or a function name.
If value is a cell,
it must contain the function name/function handle in the
first cell element and parameters to pass to the callback function in the
additional elements.
deletefcn cannot be interrupted.
enable
Specifies if handle is enabled. Valid values are
on(default) and off.
Type: string
iconsize
Specifies the size of the uipushtool icons.
Type: integer
orient
Specifies the orientation of handle. Valid values are
horizontal (default) and vertical.
Type: string
parent
Specifies the parent which must be a figure,
uipanel or uitab. If there
is no parent specified, the parent will be the default figure,
gcf().
Type: scalar
position
Position of handle. Value is specified as a vector of
form: [left top]. If 'units' has a value of
'normalized', values must be between 0 to 1.
Type: vector
tag
User-defined string to tag handle.
Type: string
tooltipstring
Tooltip.
Type: string
units
Unit of measurement.
pixels
Default option which indicates that handle has a fixed position
specified by position.
normalized
Indicates that handle is moved if
parent is moved/resized.
Type: string
userdata
User-defined numerical data.
Type: complex | mtx | scalar
value
User-defined scalar data.
Type: scalar
visible
Specifies if handle is visible. Valid values are
on(default) and off.
Type: string
Outputs
handle
Handle of the uitoolbar created.
Examples
Create a toolbar in the current figure with a vertical orientation: