Navigation

Operators and Keywords

Function List:

C++ API

: hui = uitoggletool (property, value, …)
: hui = uitoggletool (parent, property, value, …)

Create a uitoggletool object and return a handle to it.

uitoggletool are togglebuttons that appear on a figure toolbar. The button is created with a border that is shown when the user hovers over the button. An image can be set using the cdata property.

If parent is omitted then a uitoggletool for the current figure is created. If no figure is available, a new figure is created first. If a figure is available, but does not contain a uitoolbar, a uitoolbar will be created.

If parent is given then a uitoggletool is created on the parent uitoolbar.

Any provided property value pairs will override the default values of the created uitoggletool object.

Uitoggletool properties are documented at ‘Uitoggletool Properties’.

Examples:

% create figure without a default toolbar
f = figure ("toolbar", "none");
% create empty toolbar
t = uitoolbar (f);
% create a 19x19x3 black square
img=zeros(19,19,3);
% add uitoggletool button to toolbar
b = uitoggletool (t, "cdata", img);

See also: figure, uitoolbar, uipushtool.

Package: octave