TABLE_COLUMN
This command enables you to set the attributes of the slots in the data columns of an existing display table.
|
|
This command can only operate on a display table that has not been secured against change by the SECURE_TABLE command.
|
The format of the command is as follows:
TABLE_COLUMN 'table name'
COLUMN column-number
display color
background color
Logical-table-column-number
FORMAT Format-precision or 'Numeric string'
CENTER or LEFT or RIGHT
'Action Text'
END
An example of the command is given below:
TABLE_COLUMN 'table1'
COLUMN 1
blue
yellow
1
FORMAT 2
LEFT
'LINE'
COLUMN 2
red
green
2
FORMAT 3
RIGHT
'CIRCLE'
END
|
|
In the above example, the numbers on the left hand side are NOT part of the format. They are there to help you refer to each line in the example. The empty lines are there to help you read the example and understand its structure.
|
Line 1 contains TABLE_COLUMN and the name of the display table whose columns are to be defined.
Line 2 specifies COLUMN 1, which means column 1 of the display table is to be defined.
Line 3 specifies the display color for text in the column. In this example, blue is specified. If you need to use a different color, you can follow the description in section Line 3 of TABLE_LAYOUT for specifying a color.
Line 4 specifies the background color of the column. In this example, yellow is specified. If you need to use a different color, you can follow the description in section of TABLE_LAYOUT for specifying a color.
Line 5 specifies the position of the column in the connected logical table to be shown in this column in the display table.
Line 6 specifies FORMAT 2, which means the format-precision for floating-point numbers is two significant figures. For example, if the floating-point number is 123.0, the actual number will be 120. If the number is 12.6, the actual number will be 13. The default format-precision is half the width of the column.
Or, you can specify a numeric string such as '+1.2345' , which means the number will be signed, four decimal places, left-zero and right-zero suppressed. Use the HELP command to refer to the DIM_FORMAT function for details about the format of this numeric string.
Line 7 specifies LEFT, which means the data in the column is to be left-justified. You can specify one of two other possible values, CENTER and RIGHT, which mean center-justified and right-justified respectively.
Line 8 specifies the action text LINE in the column. You can specify any text string that is a valid system command.
You can specify a string of the format @s#, which means the text string comes from the title string of number # in the logical table connected with this display table. For example, if @s3 is specified, it means that the extra string 3 of the connected logical table is the actual text string specified. If you specify @t3, it means the extra string 3 of the connected logical table in single quotes is the actual text string specified. @s3 and @t3 are the same except that @t3 has two single quotes, one before and one after the extra string 3.
You can also specify a string of the format @v#, which means the text string comes from the data in column # of the logical table connected with this display table. For example, if @v4 is specified, it means that the data in column 4 of the connected logical table is the actual text string specified. If you specify @q4, it means the data in column 4 of the connected logical table in single quotes is the actual text string specified. @v4 and @q4 are the same except that @q4 has two single quotes, one before and one after the data in column 4.
You can even specify a text string of the form LINE @s4 @v2. If the extra string 4 and data in column 2 of the connected logical table are TWO_PNTS and 33,33 respectively, the actual text string is LINE TWO_PNTS 33,33.
Lines 10 to 16 is another block of parameters similar to Lines 2 to 8 to define another column in the title of the display table.
Line 17 specifies END to indicate the end of the TABLE_COLUMN command.
|
|
You can include as many blocks of parameters similar to Lines 2 to 8 as required, provided they are within the commands TABLE_COLUMN and END.
The above example can actually be rearranged as:
TABLE_COLUMN 'table1' COLUMN 1 blue yellow 1 FORMAT 2 LEFT 'LINE' COLUMN 2 red green 2 FORMAT 3 RIGHT 'CIRCLE' END
If a block of parameters can fit into a line, this format may be easier to read and compare. The important point is that parameters must be separated by at least one space or tab character.
|