ToolbarPushButton - Axes toolbar push button appearance and behavior - MATLAB (original) (raw)

ToolbarPushButton Properties

Axes toolbar push button appearance and behavior

ToolbarPushButton properties control the appearance and behavior of the axes ToolbarPushButton object. By changing property values, you can modify certain aspects of the push button.

tb = axtoolbar('default') btn = axtoolbarbtn(tb,'push') btn.Tooltip = 'My Push Button';

expand all

Button icon, specified as one of these values. The axes toolbar displays icons as grayscale images. MATLAB® scales down the image to fit, if necessary.

Example: btn.Icon = 'icon.png'

Example: btn.Icon = 'C:\Documents\icon.png'

Example: btn.Icon = 'rotate'

Button tool tip, specified as a character vector, cell array of character vectors, or a string array. Use this property to display a message when you hover the pointer over the button. To display multiple lines of text, specify a cell array of character vectors or a string array. Each element in the array displays a separate line of text.

Example: btn.Tooltip = 'My Tooltip'

Callbacks

expand all

Push button callback that executes when you click the button, specified as one of these values:

If you specify this property using a function handle, then MATLAB passes the source PushButton object and an event data structure as the first and second input arguments to the function. This table describes the fields in the event data structure.

Field Description
Source PushButton object
Axes Associated Axes object
EventName 'ButtonPushed'

Callback Execution Control

expand all

This property is read-only.

Parent/Child

expand all

Parent container, specified as an AxesToolbar object.

This object has no children. You cannot set this property.

Identifiers

expand all

This property is read-only.

Type of graphics object, returned as 'toolbarpushbutton'.

Object identifier, specified as a character vector or string scalar. You can specify a unique Tag value to serve as an identifier for an object. When you need access to the object elsewhere in your code, you can use the findobj function to search for the object based on the Tag value.

Unused Properties

expand all

Setting this property has no effect on objects of this type.

Mouse-click callback, specified as a function handle, a cell array, or a character vector.

Note

The button does not use this property.

Version History

Introduced in R2018b