Creating Graphical User Interfaces Previous page   Next Page

Adding Components to the Layout Area

You can place a component in the layout area in one of these ways:

This is an example of a GUI in the Layout Editor. Note that components in the Layout Editor are not active. Running the GUIdescribes how to generate a functioning GUI.

figure shows placing controls in the layout area

Adding a Component to a Panel or Button Group

To add a component to a panel or button group, select the component in the component palette then move the cursor over the desired panel or button group. The position of the cursor determines the component's parent. Notice that GUIDE highlights the potential parent as shown in the following figure. The highlight indicates that if you drop the component or click the cursor, the component will be a child of the highlighted panel, button group, or figure.

If the component is not entirely contained in the panel or button group, it appears to be clipped in the layout editor.

When you run the GUI, the entire component is displayed and straddles the panel or button group border. The component is nevertheless a child of the panel and behaves accordingly.

You can use the Object Browser to determine the child objects of a panel or button group. Viewing the Object Hierarchy -- The Object Browser tells you how.

Adding an ActiveX Control

When you drag an ActiveX component from the component palette into the layout area, GUIDE opens a dialog that lists all the registered ActiveX controls on your system. When you select an ActiveX control and click Create, the control appears as a small box in the Layout Editor.


Previous page  Selecting Components from the Component Palette Working with Components in the Layout Area Next page

© 1994-2005 The MathWorks, Inc.