Was this helpful?
Table Fields
A table field appears as active fields arranged in rows and columns. Each column is a stack of identical active fields. Each row consists of one active field from each column in the table field. You specify how many rows are displayed at one time; a vertical scroll bar lets the end user display the remaining rows.
Note:  The end user can scroll through a table field by using the scroll bar or by tabbing through the columns.
OpenROAD Workbench provides two orientations for table fields:
Vertical table field
Displays columns vertically and rows horizontally
Horizontal table field
Displays columns horizontally and rows vertically
OpenROAD lets you activate the “quick find keys” feature for table fields. This feature lets end users type a character to move to the first (or next) row in the column whose value begins with that character.
Note:  This feature is available only when the field bias is set to the Landable mode. For more information, see Field Biases.
The following sections describe how to create and modify a table field. For more information about working with table fields in 4GL code, see the Programming Guide.
Create a Table Field
You create a table field from one or more existing fields. When you select Table Field from the Group menu on the floating menu bar, Workbench uses each selected field as the “prototype” cell for one column in the table field.
To create a table field
1. Open your frame in the Frame Editor (see Open an Existing Frame).
2. Select the fields to be included in the table field.
Note:  For information about selecting fields, see How You Can Select Fields.
3. Click Group, Table Field.
OpenROAD creates the table field using the height of the tallest field to determine the height of each row. The width of each column is equal to whichever is greater: the length of the field itself or the length of the column title.
4. Set the properties for the table field and its columns using the Property Inspector.
A table field consists of components that you can work with individually. You can also rearrange, resize, insert, and delete individual columns in the table field.
Note:  For complete descriptions of each table field and column field property, see Table Field Properties and Column Field Properties, respectively. Also, see Common Field Properties.
After creating the table field, you can edit the table and column titles by switching to Text Mode. For more information about editing table fields, see Modify a Table Field.
Note:  You can also create table fields dynamically, including creating and mapping arrays to the table field so that it can accept and manage data. For an in-depth discussion about dynamically creating fields in OpenROAD, see the Programming Guide.
Table Field Properties
All the properties for table fields are described under Common Field Properties, with the exception of the following properties that are specific to the table field type:
ColSeparatorColor
Specifies the color of the lines that separate table field columns
Default: CC_FOREGROUND
ColSeparatorStyle
Specifies the style of the lines that separate table field columns. Valid options are:
LS_DEFAULT (system default value)
LS_SOLID
LS_DASH
LS_DOT
LS_DASHDOT
LS_DASHDOTDOT
Default: LS_SOLID
ColSeparatorWidth
Specifies the width of the lines that separate table field columns. Valid options are:
LW_DEFAULT (system default value)
LW_NOLINE
LW_MINIMUM
LW_EXTRATHIN
LW_VERYTHIN
LW_THIN
LW_MIDDLE
LW_THICK
LW_MAXIMUM
Default: LW_NOLINE
ColumnResizable
Specifies whether the column is resizable
Default: FALSE
ColumnsDisplayed
Specifies the number of visible columns. If fewer than the total number of columns, a horizontal scroll bar appears.
CurOps
Specifies which operations for table fields are enabled or disabled regardless of the frame's mode. Valid options are:
OP_NONE
Specifies that no operations on the table field are allowed
OP_APPEND
Specifies that auto append is allowed at the end of the table field only
OP_APPENDINSERT
Specifies that appending or inserting rows to the table field is allowed
OP_APPENDDELETE
Specifies that auto append at the end of the table field and deleting rows are allowed
OP_APPENDINSERTDELETE
Specifies that all operations on the table field are allowed
OP_DELETE
Specifies that deleting rows from the table field only is allowed
Default: OP_NONE
ExactHeight
Specifies the exact height of a table field with vertical orientation. This value is used to set the outer height of the table field; it takes precedence over all other settings.
ExactWidth
Specifies the exact width of a table field with vertical orientation. This value is used to set the outer width of the table field; it takes precedence over all other settings.
HasControlButton
Specifies whether OpenROAD creates a control button with default table field commands. You can edit the control button to add more commands or delete or modify the default commands. Possible values are:
TRUE
Specifies default table field commands
FALSE
Does not specify default table field commands
Default: FALSE
For more information about control buttons, see Create a Control Button.
HasHeader
Specifies whether the column titles are displayed. Possible values are:
TRUE
Specifies column headers
FALSE
Specifies no column headers
Default: TRUE
HasHeader Buttons
Specifies whether the column titles are displayed as buttons. The table field has the same appearance as a list view. Possible values are:
TRUE
Specifies that column headers are displayed as buttons
FALSE
Specifies that column headers are not displayed as buttons
Default: TRUE
HasScrollBar
Specifies whether the table field has a scroll bar that lets end users scroll through the rows. Possible values are:
TRUE
Specifies a scroll bar
FALSE
Specifies no scroll bar
Default: TRUE
IsHighlighted
Specifies whether the row that the end user has selected—the current row—is highlighted. Possible values are:
TRUE
Specifies that the current row is highlighted
FALSE
Specifies that the current row is not highlighted
Default: TRUE
NumVisibleRows
Specifies the number of rows to be displayed
Default: 4
QueryOps
Specifies the CurOps value to use when the CurMode property for a frame is set to FM_QUERY
ReadOps
Specifies the CurOps value to use when the CurMode property for a frame is set to FM_READ
RowSeparatorColor
Specifies the color of the lines between table field rows
Default: CC_FOREGROUND
RowSeparatorStyle
Specifies the style of the lines between table field rows. Valid options are:
LS_DEFAULT (system default value)
LS_SOLID
LS_DASH
LS_DOT
LS_DASHDOT
LS_DASHDOTDOT
Default: LS_SOLID
RowSeparatorWidth
Specifies the width of the lines between table field rows. Valid options are:
LW_DEFAULT (system default value)
LW_NOLINE
LW_MINIMUM
LW_EXTRATHIN
LW_VERYTHIN
LW_THIN
LW_MIDDLE
LW_THICK
LW_MAXIMUM
Default: LW_NOLINE
ScrollingChangesSelection
Specifies whether scrolling the selected row out of view sets the new selected row to the topmost or bottommost visible row of the table field, depending on the direction of the scrolling. Otherwise, a single selection is unchanged by scrolling with the scroll bar. Possible values are:
TRUE
Specifies that the selected row changes as rows are scrolled
FALSE
Specifies that the selected row does not change as rows are scrolled
Default:
TRUE, if SelectionType is set to SEL_SINGLE
FALSE, if SelectionType is SEL_MULTIPLE (this property is automatically set to FALSE)
SelectionType
Indicates the number of rows that the end user may select. Valid options are:
SEL_SINGLE
Specifies that only a single row in a list field or table field may be selected at a time
SEL_MULTIPLE
Specifies that multiple rows of a list field or table field may be selected at a time. To make multiple selections, the end user clicks the desired rows while holding down the Shift key.
Default: SEL_SINGLE
Title
Defines the title to be displayed for the table field
UpdateOps
Specifies the CurOps value to use when the CurMode property for a frame is set to FM_UPDATE
User1Ops
Specifies the CurOps value to use when the CurMode property for a frame is set to FM_USER1
User2Ops
Specifies the CurOps value to use when the CurMode property for a frame is set to FM_USER2
User3Ops
Specifies the CurOps value to use when the CurMode property for a frame is set to FM_USER3
Column Field Properties
Column fields have the following properties:
ColumnNumber
Specifies the ordinal position of the column in the table field
Default: 1, indicating the top or left
HasCellAttributes
Specifies whether you can set visual properties for individual cells in the column. Possible values are:
TRUE
Specifies that you can set visual properties for individual cells
Note:  Setting HasCellAttributes to TRUE impacts application performance. For more information, see the chapter "Working with Arrays, Table Fields, and Collections" in the Programming Guide.
FALSE
Specifies that you cannot set visual properties for individual cells
Default: FALSE
HasSingleCharFind
Specifies whether the end user may move the focus of the specified column to the next row whose value begins with the character the end user enters. (This property is valid only while focus is on a Landable entry field in the specified column.) Possible values are:
TRUE
Specifies that the end user can move the focus
FALSE
Specifies that the end user cannot move the focus
Default: TRUE
Title
Specifies the title that OpenROAD displays for the column field
Modify a Table Field
You can modify a table field in the following ways:
Move columns
Change column properties
Change visual characteristics of columns
Copy and paste other fields into a table field
See the appropriate procedure, following, for instructions on performing these actions.
To move a column
To select a column to move, click any cell in the column except the first cell.
The entire column is highlighted, and you can then move it as necessary.
To change the properties of a column
The first cell in the column is the prototype cell for the column. Select the first cell in the column to change the properties (in the Property Inspector) for the entire column.
To change the visual characteristics of a column
Select the entire column by clicking any cell in the column except the top cell. Change the properties in the Property Inspector.
To copy and paste other fields into a table field
Use the commands on the Edit menu of the floating menu bar.
The copied field becomes the prototype for a new column of the table field.
For more information about copying fields, see Copy and Paste a Field.
Last modified date: 12/20/2023