This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this 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)


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