Workbench User Guide : Creating and Using Basic Fields : How You Can Add Fields to a Frame
 
Share this page          
How You Can Add Fields to a Frame
There are several ways to create the various types of fields for a form. The Frame Editor's tools—the field palette and the Insert Field and Group menu commands—are described here. Field templates and several other methods are discussed in Alternative Methods for Creating Fields.
You can use the tools provided in the Frame Editor to create fields for your frame following these basic steps.
1. Select the type of field to be created in the Frame Editor.
For active or shape fields, click one of the field palette icons or select a field type from the Insert Field submenu. For composite fields, you select a field type from the Group menu.
2. Position and size the field on the form.
Depending on the field type you have chosen, the field is created when you drag the cursor—creating a field boundary—or click at the starting point for the field. This is discussed in detail in Position Fields.
Note:  You cannot change the size of some fields, such as control buttons. The size of other fields is determined by the text they contain and cannot be changed.
3. Set the properties for the new field using the Property Inspector.
Field properties include various options you can set to determine how the field should look and behave. See the appropriate section for setting a specific field's properties, such as Button Field Properties or List Field Properties. Because fields share many properties, also see Common Field Properties.
4. For certain field types, write the field script (or section of the frame script) that defines the events for the field.
You use the 4GL programming language to write the scripts for your fields. You can write your scripts using the Script Editor—the OpenROAD script editing facility—or with your system editor. For more information about writing scripts, see Writing Scripts and Procedures.
5. Test the field.
You can test your new field at any point while you are developing the frame to see how the field looks and acts when the application is running. See How You Can Test Frames.