|
User Interface Programming: Using the IDL GUIBuilder |
|
You will use the following tools to design and construct a graphical interface using the IDL GUIBuilder:
The IDL GUIBuilder has its own toolbar in the IDE, which you use to create the widgets for your user interface. The following figure shows the toolbar.
These are the widget types you can create using the IDL GUIBuilder toolbar.
|
Widget
|
Description
|
|---|---|
|
Base
|
Creates a container for a group of widgets within a top-level base container. A top-level base is contained in the IDL GUIBuilder window, and you build your interface in it. Use base widgets within the top-level base to set up the widget hierarchy, layout, and to organize the application. For example, you can use a base widget to group a set of buttons. See Base Widget Properties for property and event information.
|
|
Button
|
Creates a push button. The easiest way to allow a user to interact with your application is through a button click. You can have button widgets display labels, menus, or bitmaps. See Button Widget Properties for property and event information.
|
|
Radio Button
|
Creates a toggle button that is always grouped within a base container. Use radio buttons to present a set of choices from which the user can pick only one. See Button Widget Properties for property and event information.
|
|
Checkbox
|
Creates a checkbox, which you can use either as a single toggle button to indicate a particular state is on or off or as a list of choices from which the user can select none to all choices. Checkboxes are created within a base container. See Button Widget Properties for property and event information.
|
|
Text
|
Creates a text widget. Use text widgets to get input from users or to display multiple lines of text. For information on text widget properties, see Text Widget Properties.
|
|
Label
|
Creates a label. Use label widgets to identify areas of your application or to label widgets that do not have their own label property. Use labels when you have only a single line of text and you do not want the user to be able to change the text. For information on label widget properties, see Label Widget Properties.
|
|
Horizontal and Vertical Sliders
|
Creates a slider with a horizontal or vertical layout. Use slider widgets to allow the user to control program input, such as adjust the speed of movement for a rotating image. For information on slider properties, see Slider Widget Properties.
|
|
Droplist
|
Creates a droplist widget, which you can use to present a scrollable list of items for the user to select from. The droplist is an effective way to present a lot of choices without using too much interface space. For information on droplist properties, see Droplist Widget Properties.
|
|
Listbox
|
Creates a list widget, which you can use to present a scrollable list of items for the user to select from. For information on listbox properties, see Listbox Widget Properties.
|
|
Draw Area
|
Creates a draw area, which you can use to display graphics in your application. The draw area can display IDL Direct Graphics or IDL Object Graphics, depending on how you set its properties. For information on the draw area properties, see Draw Widget Properties.
|
|
Table
|
Creates a table widget, which you can use to display data in a row and column format. You can allow users to edit the contents of the table. For information on the table widget properties, see Table Widget Properties.
|
|
Tab
|
Creates a tab widget on which different "pages" (base widgets and their children) can be displayed by selecting the appropriate tab. For information on the tab widget properties, see Tab Widget Properties.
|
|
Tree
|
Creates a tree widget, which presents a hierarchical view that can be used to organize a wide variety of data structures and information. For information on the tree widget properties, see Tree Widget Properties.
|
| Note The Select Cursor button returns the cursor to its standard state, and it indicates that the cursor is in that state. After you click on another button and create the selected widget, the cursor returns to the selection state. |
All widgets for a user interface must be descendents of a top-level base; in the IDL GUIBuilder window, all widgets must be contained in a top-level base widget. When you open an IDL GUIBuilder window, it contains a top-level base. You can add base widgets to that top-level widget to form a widget hierarchy. The added bases can act as containers for groups of widgets.
To create a widget, do one of the following:
After you add widgets to a top-level base, you can resize, move, and delete them, and you can change their parent base. You can also set properties for each widget. For information on how to operate on widgets, see Widget Operations, and for information on setting properties, see Using the Properties Dialog.
IDL Online Help (March 06, 2007)