Format of GUI Form Templates Fields

 

FIELD

<field label>

id

<integer field id (numbered from 1)>

class

<field data class>

prompt

<field prompt>

options

<OPTIONAL comma-delimited list of options>

callback

<OPTIONAL function that is called when the field is modified>

(int function(char *template name, int field_id, int idx_data))

(maximum name length = 15 characters)

list (keyword that tells Input Manager to collect a list of items)

 

+

usr_ctl <OPTIONAL flag making the widget available for the user to disable/enable for input, the form must be flagged in order for this flag to be valid>

 

If "id" isn't specified, it is set to the field id of the previous field plus one. If it is the first field, the "id" is initialized to zero. It is a good idea to explicitly define "id", so that your "handle" to the field doesn't change if you re-order the sequence of the fields within the template.

 

The following attributes define the visual representation of the field. If the field won't be displayed as part of a visual form, these attributes aren't required.

 

wid_class <class of UI widget used to display the field>

 

wid_const <id>,<constraint>,<offset>

 

 

<id>

Integer id of field that widget is relative to (0=base form or group frame when part of a group)

<constraint>

Constraint setting that has the following possible values:

 

BT - Bottom of relative widget to top of this widget

TB - Top of relative widget to bottom of this widget

RL - Right of relative widget to left of this widget

LR - Left of relative widget to right of this widget

TT - Top of relative widget to top of this widget

BB - Bottom of relative widget to bottom of this widget

LL - Left of relative widget to left of this widget

RR - Right of relative widget to right of this widget

<offset>

Offset in unit spacing from the relative widget in the direction of the constraint

 

wid_label <num>,<alignment>

<num> - Label width in unit spacing

 

<alignment> - Character value for the alignment for label, r=right, c=center (default), l=lef

If "wid_label" isn't specified, then the width will be set to the width of the text used in the setting "FIELD = <field label>" and the alignment is center. You may set one of the values without setting the other by simply leaving that field empty. However, make sure you include the comma when setting the alignment.

wid_group

<integer id of group to which the widget belongs>

If "wid_group" isn't specified, it is set to "0" by default, which means the widget doesn't belong to any group.

 

Return to VX CAD/CAM Index