MATLAB Function Reference |
Create push button on a toolbar
Syntax
Description
uipushtool('PropertyName1',value1,'PropertyName2',value2,...)
creates a push button on the uitoolbar at the top of the current figure window, and returns a handle to it. uipushtool
assigns the specified property values, and assigns default values to the remaining properties. You can change the property values at a later time using the set
function.
Type get(htt)
to see a list of uipushtool object properties and their current values. Type set(htt)
to see a list of uipushtool object properties that you can set and their legal property values. See the Uipushtool Properties reference page for more information.
uipushtool(ht,...)
creates a button with ht
as a parent. ht
must be a uitoolbar handle.
Remarks
uipushtool
accepts property name/property value pairs, as well as structures and cell arrays of properties as input arguments.
Uipushtools appear in figures whose WindowStyle
is normal
or docked
. They do not appear in figures whose WindowStyle
is modal
. If a figure containing a uitoolbar and its uipushtool children is changed to WindowStyle
modal
, the uipushtools still exist and are contained in the Children
list of the uitoolbar, but are not displayed until the WindowStyle
is changed to normal
or docked
.
Properties
This table lists all properties useful to uipushtool
objects, grouping them by function. Each property name acts as a link to a more detailed description of the property.
Property Name |
Property Description |
Property Value |
Controlling Style and Appearance | ||
CData |
Truecolor image displayed on the uipushtool |
Value: m-by-n-by-3 array |
Separator |
Separator line mode |
Value: on , off Default: off |
Visible |
Uipushtool visibility |
Value: on , off Default: on |
General Information About the Object | ||
BeingDeleted |
This object is being deleted |
Value: on , off (read-only)Default: off |
Enable |
Enable or disable the uipushtool |
Value: on , inactive , off Default: on |
Parent |
Uipushtool object's parent toolbar. |
Value: handle |
Tag |
User-specified object identifier |
Value: string |
TooltipString |
Content of object's tooltip |
Value: string |
Type |
Class of graphics object |
Value: string (read-only) Default: uipushtool |
UserData |
User-specified data |
Value: array |
Controlling Callback Routine Execution | ||
BusyAction |
Interruption of other callback routines |
Value: cancel , queue Default: queue |
ClickedCallback |
Control action. |
Value: string or function handle |
CreateFcn |
Callback routine executed during object creation |
Value: string or function handle |
DeleteFcn |
Callback routine executed during object deletion |
Value: string or function handle |
Interruptible |
Callback routine interruption mode |
Value: on , off Default: on |
Controlling Access to Objects | ||
HandleVisibility |
Handle accessibility from command line and code associated with the GUIs. |
Value: on , callback , off Default: on |
Examples
This example creates a uitoolbar object and places a uipushtool object on it.
h = figure('ToolBar','none') ht = uitoolbar(h) a = [.05:.05:0.95]; b(:,:,1) = repmat(a,19,1)'; b(:,:,2) = repmat(a,19,1); b(:,:,3) = repmat(flipdim(a,2),19,1); hpt = uipushtool(ht,'CData',b,'TooltipString','Hello')
See Also
get
, set
, uicontrol
, uitoggletool
, uitoolbar
Uipanel Properties | Uipushtool Properties |
© 1994-2005 The MathWorks, Inc.