Was this helpful?
Setting Field and Column Display Attributes
You can assign display attributes to:
Individual fields
Table field columns
Individual values in table field data sets
Individual cells in table fields The FRS combines the various attributes assigned to a cell. For color, the lowest color code is used.
Assign Display Attributes to Individual Fields
To assign display attributes to fields:
set_frs field formname
     (display[(fieldname)] = value
     {, display[(fieldname)] = value})
Assign Display Attributes to Table Field Columns
To assign display attributes to table field columns:
set_frs column formname tablename
    (display[(columnname)] = value
    {, display[(columnname)] = value})
Assign Display Attributes to Table Field Data Set Values
You can assign display attributes to individual data set values or cells in a table field. When you assign a display attribute to a value, the attribute scrolls with the value; when you assign a display attribute to a cell, the attribute does not scroll.
To assign display attributes to a value in a table field data set, you must use the set_frs row statement within an unloadtable loop. You must omit row number. The syntax is:
set_frs row formname tablename
     (display(columnname) = value
    {, display(columnname) = value})
Explicitly name the display attributes in the statement for each column you change. To apply a change to all columns in a table field you must have a (display(columnname) = value for each column.
You can also assign display attributes to table field values using the insertrow and loadtable statements; see the command descriptions in this chapter for more information.
Assign Display Attributes to Table Field Cells
To assign display attributes to a specific cell in a table field, you must specify row number as well as column name. The syntax is:
set_frs row formname tablename rowno
     (display(columnname) = value
    {, display(columnname) = value})
Display Parameters
You can specify form objects using (quoted or unquoted) string literals or host string variables.
Value must be 0, 1, or an integer host variable having a value of 0 or 1. 1 turns the specified display attribute on; 0 turns the attribute off. If you are assigning a color, value must specify the color code, from 0 to 7.
Valid values for the display parameter are:
blink
Specifies that the field blinks on and off
color
Specifies that the field is displayed in the specified color (0 - 7)
displayonly
Specifies that the field is displayed but the user cannot change it; invalid for table fields and set frs row
intensity
Specifies that the field is displayed in half or bright intensity, depending on terminal
invisible
Specifies that the field is not displayed
normal
Specifies no special attributes
reverse
Specifies that the field is displayed in reverse video
underline
Specifies that the field is underlined
Each display attribute for a field is by default turned off, unless it was turned on when the form was defined in VIFRED or by a previous set_frs statement. The set_frs statement overrides any previous setting of a particular display attribute for a field, and can be used to turn off any attributes previously turned on. For details about display attributes, see the Character-based Querying and Reporting Tools User Guide.
The normal display attribute actually signifies the lack of any display attribute. Setting normal to 1 causes any blink, intensity, reverse, and underline display attributes currently in effect for a field, column, table field value or cell, to be turned off. Setting normal to 0 has no effect.
The FRS displays the changes when the application program exits the code block that contains the set_frs statement. To display the change before the end of the code block, follow the set_frs statement with a redisplay statement.
Examples--set_frs statement:
Example 1:
The following statement causes the current field in the current form to appear in reverse video and blink:
exec frs set_frs field ' ' (reverse = 1, blink = 1)
Example 2:
The following statement turns off blinking in the partname column of the table field partstbl in the parts form:
exec frs set_frs column parts partstbl 
    (blink(partname) = 0)
Last modified date: 08/14/2024