Manuals >User's Guide >Creating Graphic User Interfaces
Print version of this Book (PDF file)
prevnext

The Widget Properties Dialog Box

The dialog box is shown below

.

The Widget Properties Dialog Box is launched

    • when the Add... or Add Child... buttons are selected.
    • when the Properties button is selected.
    • when a widget in the right window is double-clicked.

The top level item in this box is the Select Type box. Press the activate button on the right side of it. A dropdown menu appears offering sixteen choices of widgets.

Widget Classes

The available widgets perform four general functions: organizing placement, handling single variables, and handling lists.

Placement Widgets

The Table (of anything) and the Tabbed Folder (of pages) organize layout of widgets within a GUI.

Single Variable Widgets

The Spin Box and the Slider increment and decrement variables declared with the Current Value and Real Value options respectively.

The Edit Box can be used for both input and output, while the Label is like a read only Edit Box. Labels can be large blocks of text including many carriage returns. They are used to hold the text on Pages.

Multiple Variable (List) Widgets

Notice that the Dropdown Combo, dropdown List Combo, List, Radio Box, and Spreadsheet are all different styles of list from which the user may select one or more values. The Option Items allows you to declare an ICCAP_ARRAY that stores the values that are displayed. The option Selected Index allows us to declare an integer which is an index into the selected member of the array. This can then be read by macros and programs. The is unique in that it uses a two-dimensional array as its primary list.

Widget Naming

Once the widget type has been chosen it can be named in the top box of the Widget Properties dialog box. This is not essential but it is very desirable since it makes the widget map (as distinct from the GUI itself) much more intelligible.


Note


Duplicate naming of siblings is prevented.

The top level name of in a GUI becomes the name of the GUI which a macro uses to execute it. Lower level GUI's are called with a hierarchical a.b.c convention.


Using the Properties Dialog Box

Once the widget type has been selected and named it is mandatory that it be assigned a variable to modify and/or a function to call if the widget is to handle input or output.

Once a widget type has been selected, the left side of the properties box shows a list of the Options and a list of Callbacks available for this widget.

Select, for example, the option Caption.

    • The information box at the bottom will show relevant information.
    • The title of the right side editing area changes to Editing: Caption.

For a fixed caption:

  1   Click on the box titled Please Enter Text Value and enter the text for the caption, e.g "Start". Do not use the enter key unless you are entering multi-line captions.

  2   Click on the OK or Apply button immediately below. In the Options list Caption will be shown as Caption (Start).

For a variable Caption:

  1   In the Editing: Caption box set Track Variable to on (so that an x shows in the box).

  2   Click on the box titled Variable and enter the variable name, e.g. buttonName.

  3   Then click on the OK or Apply button immediately below. In the Options list Caption will be shown as Caption (Variable buttonName).

  4   The variable buttonName must be declared in a variable table, e.g. the Model Variable table accessed by clicking on the Model Variables tab.

For the GUI to accept the information from the Widget Properties dialog box, click on either the OK or the Apply buttons at the bottom left corner. OK dismisses the dialog box, while Apply leaves it in place.


prevnext