MATLAB Creating Graphical User Interfaces

(Barry) #1

10 Lay Out a Programmatic UI


Component Function Description
“Tables” on page
10-21

uitable Tables contain rows of numbers, text
strings, and choices grouped by columns.
They size themselves automatically to fit
the data they contain. Rows and columns
can be named or numbered. Callbacks are
fired when table cells are selected or edited.
Entire tables or selected columns can be
made user-editable.
“Toggle Button” on
page 10- 11

uicontrol Toggle buttons generate an action and
indicate whether they are turned on or off.
When you click a toggle button, it appears
depressed, showing that it is on. When you
release the mouse button, the toggle button
remains depressed until you click it a second
time. When you do so, the button returns to
the raised state, showing that it is off. Use a
button group to manage mutually exclusive
radio buttons.
Toolbar Buttons uitoolbar,
uitoggletool,
uipushtool

Non-modal UIs can display toolbars,
which can contain push buttons and toggle
buttons, identified by custom icons and
tooltips.

Components are sometimes referred to by the name of the function used to create them.
For example, a push button is created using the uicontrol function, and it is sometimes
referred to as a uicontrol. A panel is created using the uipanel function and may be
referred to as a uipanel.
Free download pdf