Creating a variable field in a print or text form

Variable fields can serve as input or output text in a form. Each variable field is based on an EGL primitive or a DataItem part. Unlike constant fields, variable fields can be accessed by EGL code. To insert a variable field into a form, follow these steps:
  1. Open a form group in the EGL form editor.
  2. If the form group has no forms, add a form to the form group. See Creating a form.
  3. On the Palette view, click a type of variable field to add. The following types of variable fields are available by default:
    Table 1. Variable fields available in the Palette view
    Field name Default color Default intensity Default highlighting Default Protection
    Input Green Normal Underlined No
    Output Green Normal None Skip
    Message Red Bold None Skip
    Password Green Invisible None No

    These fields are samples of commonly used variable text fields in a text-based interface. You can customize the individual fields after placing them on a form. You can also customize the default color, intensity, and highlighting of the fields available in the Palette view. See Setting preferences for the EGL form editor palette entries.

  4. Within a form in the editor, click and hold the mouse to draw a rectangle that represents the size and location of the field. A preview box next to the mouse cursor shows you the size of the field and its location relative to the form.
    Note: You can add a field only within an existing form.
  5. When the field is the correct size, release the mouse. The New EGL Field window opens.
  6. In the New EGL Field window, enter the name of the new field in the Name field.
  7. Do one of the following to select the type of field:
    • To use a primitive type, click a primitive type from the Type list.
    • To use a DataItem part, follow these steps:
      1. Click dataItem from the Type list. The Select a DataItem Part window opens.
      2. In the Select a DataItem Part window, click a DataItem part from the list or type the name of one.
      3. Click OK.
  8. As necessary, type values in the Dimensions field or fields to set the dimensions of the new variable field.
  9. If you want to make the field an array, select the Array check box.
  10. If the Array check box is selected, click Next and continue following these steps. Otherwise, click Finish and stop following these steps. The new field is created and you do not need to follow the rest of these steps, because they are applicable only if you are creating an array.
  11. On the Array Properties page of the New EGL Field window, type the size of the array in the Array Size field.
  12. Choose an orientation of Down or Across from the Index Orientation buttons.
  13. Under Layout, enter the number of vertical and horizontal fields in the Fields Down and Fields Across fields.
  14. Under Spaces, enter the amount of space between the array's rows and columns in the Lines between rows and Spaces between columns fields.
  15. Click Finish. The new field is created in the form group.

Once you have created the new field, click the field to select it and set the properties for the field in the Properties view.

Since variable fields have no default value, they can be invisible if they are not highlighted. To mark each variable field with appropriate sample text, click the Toggle Sample Values button at the top of the editor.

Once you have created a variable field, you can double-click it in the editor to open the Edit Type Properties window. From this window you can edit the field in the following ways:

When you are finished editing the field's properties in the Edit Type Properties window, click OK.

Related concepts
EGL form editor overview
Editing form groups with the EGL form editor
Form part

Related tasks
Setting preferences for the EGL form editor palette entries
Creating a constant field

Related reference
Form part in EGL source format

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.