uitoggletool - Create toggle button on toolbar

Syntax

htt = uitoggletool('PropertyName1',value1,'PropertyName2',value2,...)
htt = uitoggletool(ht,...)

Description

htt = 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.

htt = 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.

Toggle tools appear in figures whose Window Style is normal or docked. They do not appear in figures whose WindowStyle is modal. If the WindowStyle property of a figure containing a tool bar and its toggle tool children is changed to modal, the toggle tools still exist and are contained in the Children list of the tool bar, but are not displayed until the WindowStyle is changed to normal or docked.

Examples

This example creates a uitoolbar object and places a uitoggletool object on it.

h = figure('ToolBar','none');
ht = uitoolbar(h);
a = rand(16,16,3);
htt = uitoggletool(ht,'CData',a,'TooltipString','Hello');

See Also

get, set, uicontrol, uipushtool, uitoolbar

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS