MATLAB Function Reference Previous page   Next Page
uitoggletool

Create toggle button on a toolbar

Syntax

Description

uitoggletool('PropertyName1',value1,'PropertyName2',value2,...) creates a toggle button on the uitoolbar at the top of the current figure window, and returns a handle to it. uitoggletool 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 uitoggletool object properties and their current values. Type set(htt) to see a list of uitoggletool object properties you can set and legal property values. See the Uitoggletool Properties reference page for more information.

uitoggletool(ht,...) creates a button with ht as a parent. ht must be a uitoolbar handle.

Remarks

uitoggletool accepts property name/property value pairs, as well as structures and cell arrays of properties as input arguments.

Uitoggletools 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 uitoggletool children is changed to WindowStyle modal, the uitoggletools 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 uitoggletool 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 uitoggletool
Value: m-by-n-by-3 array
Separator
Separator line mode
Value: on, off
Default: off
Visible
Uitoggletool 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 uitoggletool
Value: on, inactive, off
Default: on
Parent
Uitoggletool object's parent toolbar
Value: handle
State
Uioggletool state
Value: on, off
Default: off
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: uitoggletool
UserData
User-specified data
Value: array
Controlling Callback Routine Execution
BusyAction
Interruption of other callback routines
Value: cancel, queue
Default: queue
ClickedCallback
Control action independent of toggle tool position
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
OffCallback
Control action when uitoggletool is set to the off position
Value: string or function handle
OnCallback
Control action when uitoggletool is set to the on position
Value: string or function handle
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 uitoggletool object on it.

See Also

get, set, uicontrol, uipushtool, uitoolbar


Previous page  uistack Uitoggletool Properties Next page

© 1994-2005 The MathWorks, Inc.