uitoolbar

Create toolbar on figure

Syntax

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

Description

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.

Examples

This example creates a figure containing an empty uitoolbar.

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

More About

expand all

Tips

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'.

Was this topic helpful?