Skip to Main Content Skip to Search
Product Documentation

uitoolbar - Create toolbar on figure

Syntax

ht = uitoolbar('PropertyName1',value1,'PropertyName2',value2,...)
ht = uitoolbar(h,...)

Description

ht = uitoolbar('PropertyName1',value1,'PropertyName2',value2,...) creates an empty toolbar at the top of the current figure window, and returns a handle to it. uitoolbar 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(ht) to see a list of uitoolbar object properties and their current values. Type set(ht) to see a list of uitoolbar object properties that you can set and legal property values. See the Uitoolbar Properties reference page for more information.

ht = uitoolbar(h,...) creates a toolbar with h as a parent. h must be a figure handle.

Tips

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

Uitoolbars 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 uitoolbar is changed to modal, the uitoolbar still exists and is contained in the Children list of the figure, but is not displayed until the WindowStyle is changed to normal or docked.

Examples

This example creates a figure with no toolbar, then adds a toolbar to it.

h = figure('ToolBar','none')
ht = uitoolbar(h)

See Also

get | set | uicontrol | uipushtool | uitoggletool

  


» Learn more
» Download free kit
» Get trial software

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