This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Create toolbar on figure


t = uitoolbar
t = uitoolbar(Name,Value,...)
t = uitoolbar(parent)
t = uitoolbar(parent,Name,Value,...)


t = uitoolbar creates a uitoolbar in an existing figure and returns the uitoolbar object, t. If there is no figure available, then MATLAB® creates a new figure to serve as the parent.

t = uitoolbar(Name,Value,...) creates a uitoolbar and specifies one or more uitoolbar property names and corresponding values. Use this syntax to override the default uitoolbar properties.

t = uitoolbar(parent) creates a uitoolbar in a specific parent figure. The parent input argument is the parent figure object.

t = uitoolbar(parent,Name,Value,...) creates a uitoolbar with a specific parent and one or more uitoolbar properties.


This example creates a figure containing an empty uitoolbar.

f = figure('ToolBar','none')
t = uitoolbar(f)

More About

collapse all


Uitoolbars do not appear in figures whose WindowStyle property is set to 'Modal'. If a figure containing a uitoolbar child is changed to 'Modal', the uitoolbar child still exist in the Children property of the figure. However, the uitoolbar does not display while WindowStyle is set to 'Modal'.

Introduced before R2006a

Was this topic helpful?