Version 6.3.8 für Windows
 —  Leitfaden zur Programmierung  —

Working with Arrays of Dialog Elements

It is sometimes convenient to arrange dialog elements in one or two dimensions. If, for example, you want to arrange several radio button controls in one column, it is possible to draw the first one and specify the others as a one-dimensional array.

Beginn der AnweisungslisteTo work with arrays of dialog elements

  1. Choose the Array button in the radio button control's attributes window. The Array Specification dialog box appears.

  2. Enter:

The array will now be treated as a graphical entity. Note that you will have to assign a common GROUP-ID attribute to each radio button control. This will enable you to treat the array as a logical entity.

For each dialog element in an array, the following attributes may be specified separately:

In an event handler for an array of dialog elements, the system variable *CONTROL will denote one of the array elements.

If a variable is selected as the source of an attribute value, the array must contain at least the index ranges of the dialog element.

If a message file ID is specified as the source of an attribute value, consecutive messages are taken for the array's sequence of dialog elements.

In an array of dialog elements, you can assign one value to all dialog elements in the array using the (*) notation or a range, such as in the following examples:

#PB-1.ENABLED(*) := TRUE    /*invalid 
#PB-1.ENABLED(1:3) := TRUE  /*invalid

An alternative way of creating a sequence of identical dialog elements is to duplicate or copy and paste an individual dialog element and use the grid plus the cross-hair cursor to place them.

The following example illustrates how to set the STRING attribute of occurence 2 in a one-dimensional push button array:

#PB-2.STRING(2) := 'HUGO' 

Seitenanfang