14. VIFRED Form Components : Create Operation : Table Fields : Create a Table Field
 
Share this page                  
Create a Table Field
To create a new table field on a form
1. In the Form Layout frame, place the cursor where you want the upper left corner of the table field to be, and then choose the Location operation.
The location of the cursor is marked with a plus sign (+).
2. Choose the Create operation.
The Create submenu appears.
3. Choose the TableField operation.
VIFRED displays the Table Field frame.
You can enter the following information on the Table Field form:
Name of Table Field
The internal name of the table field.
Display Lines? (y/n)
Displays or suppresses lines between rows of the table field. The default is to display lines.
Number of Rows to Display
The number of rows to display in the table field. The default is 4.
Highlight Current Row? (y/n)
Displays or suppresses highlighting of current row when cursor is in a table field. The default is no highlighting.
Display Column Titles? (y/n)
Displays or suppresses appearance of column titles. The default is to display column titles.
Invisible Field? (y/n)
Prevents on‑screen display of the entire table field. You cannot place the cursor in this field with the Tab or Return keys.
Title of a Column
The title of the column that the user sees when the form displays.
Column Internal Name
The internal name by which VIFRED identifies the column. By default, the internal name is the same as the column title (with non‑legal characters removed).
Display Format
The display format for the column's data.
In the field, Name of Table Field, type a name that complies with valid object naming rules. For more information, see Naming and Name Use Conventions.
4. In the field, Number of Rows to Display, type the number of rows that you want displayed in the new table field or press Tab to keep the default value of 4. A table field can display up to 99 rows.
5. In the Display Lines field, choose whether to display lines between the rows of the table field. Type n (no) if you do not want to display lines or press Tab to keep the default value of y. Displaying separation lines leaves less room for data rows.
6. In the Highlight Current Row field, choose whether to highlight the current row the cursor is on whenever the cursor is in the table field. The highlighted row moves with the cursor. This Highlight Current Row function is only available through VIFRED; it cannot be turned on and off dynamically from an application.
7. In the Display Column Titles field, choose whether to display column titles. Choosing n turns off the display of column titles. If you turn off the display of column titles, you can create column titles as trim and use the Box/Line capability to create lines on the form, or you can omit column titles on your form.
8. In the field, Invisible Field, choose whether you want to prevent the on‑screen display of the entire table field. Invisibility applies to the entire table field. You cannot place the cursor on an invisible field with Tab or Return.
9. To create the columns in your table field, you can either use the GetTableDef operation to create default columns, or create your own columns, as follows:
If you are creating a table field that corresponds to one or more tables in the database, you can choose the GetTableDef operation to create default columns based on the database tables, as discussed in Creating Default Table Field Columns with GetTableDef.
When you have created the columns for your Table Field, use the Insert, Delete, EditAttr, and Move operations on the Table Field frame to edit them, as you want. For more information, see the discussions following this procedure.
10. When you finish entering specifications for the new table field:
Select the End operation to return to the Form Layout frame. Your new table field appears.
To cancel the creation of a new table field, choose the Cancel operation instead of the End operation.
11. Use the Save operation to permanently retain the form definition. If you exit without saving the form, all your changes are lost.