Navigation

Operators and Keywords

Function List:

C++ API

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

Create a uipushtool object and return a handle to it.

uipushtools are buttons 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 uipushtool 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 an uipushtools is created on the parent uitoolbar.

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

Uipushtool properties are documented at ‘Uipushtool 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 pushtool button to toolbar
b = uipushtool (t, "cdata", img);

See also: figure, uitoolbar, uitoggletool.

Package: octave