User`s guide
11 Lay Out a Programmatic GUI
Create Toolbars for Programmatic GUIs
In this section...
“Use the u itoolbar Function” on page 11-88
“Commonly Used Properties” on page 11-88
“Toolbars” on p age 11-89
“Display and Modify the Standard Toolbar” on page 11-92
Use the uitoolbar Function
Use the uitoo lbar function to add a custom toolbar to your GUI. Use the
uipushtool and uit oggletool functions to add push to ols and to ggle tools
to a toolbar. A push tool functions as a push button. A toggle tool functions
as a toggle button. You can add push tools and toggle tools to the standard
toolbar or to a custom toolbar.
Syntaxes for the
uitoolbar, ui push tool,anduito ggle tool functions include
tbh = uitoolbar(h,'PropertyName',P ropertyValue,...)
pth = uipushtool(h,'PropertyNam e',PropertyValue,...)
tth = uitoggletool(h,'PropertyN ame',PropertyValue,...)
where tbh, pth ,andtth are the handles, respectively, of the resulting toolbar,
push tool, and toggle tool. See the
uitoolbar, uipushtool,anduitoggletool
reference page s for other valid syntaxes.
Subsequent topics describe commonly used properties of toolbars and toolbar
tools, offer a simple e xample, and discuss use of the MATLAB standard
toolbar:
Commonly Used Properties
The most commonly u sed properties needed to describe a toolbar and its tools
are shown in the following table.
11-88