
6 Laying Out a GUI
6-18
Adding Components to the Layout Area
This topic tells you how to place components in the layout area and give each
component a unique identifier.
1 Place a component in the layout area. Use either of these ways:
- Click the component in the component palette, then drag it into the layout
area and drop it.
- Select the component in the component palette. The cursor changes to a
cross. Add the component to the layout by either (1) placing the cursor in
the layout area where you want the upper-left corner of the component to
be and clicking, or (2) placing the cursor in the layout area where you want
Button Group Button groups are like panels but can be used to manage
exclusive selection behavior for radio buttons and toggle
buttons.
For radio buttons and toggle buttons that are managed by
a button group, you must include the code to control them
in the button group’s
SelectionChangeFcn callback
function, not in the individual user interface control
(uicontrol)
Callback functions. A button group overwrites
the
Callback properties of radio buttons and toggle
buttons that it manages.
ActiveX
Component
ActiveX components enable you to display ActiveX
controls in your GUI. They are available only on the
Microsoft Windows platform.
An ActiveX control can be the child only of a figure, i.e., of
the GUI itself. It cannot be the child of a panel or button
group.
See “ActiveX Control” on page 8-31in this document for an
example. See MATLAB COM Client Support in the online
MATLAB documentation to learn more about ActiveX
controls.
Component Description
Kommentare zu diesen Handbüchern