Define cell decoration attributes array for the specified list (singular dialog only).
setCellAttributes( attributes ARRAY )
In an INPUT ARRAY or DISPLAY ARRAY dialog, the setCellAttributes() method can be used to specify display attributes for each cell.
The setCellAttributes() method is designed for dialog programming, where only one screen array is used (for example, in a singular DISPLAY ARRAY dialog). An equivalent method called setArrayAttributes() can be used, when several screen arrays are defined in a multiple dialog, to be able to idenfify the list by the name of the screen array.
Possible values for cell attributes are a combination of the following:
Define an array with the same number of record elements as the data array used by the INPUT ARRAY or DISPLAY ARRAY. Each element must have the same name as in the data array, and must be defined with a character data type (typically: STRING):
DEFINE data DYNAMIC ARRAY OF RECORD pkey INTEGER, name VARCHAR(50) END RECORD DEIFNE attributes DYNAMIC ARRAY OF RECORD pkey STRING, name STRING END RECORD
Fill the display attributes array with color and video attributes. These must be specified in lowercase characters and separated by a blank (ex: "red reverse"):
FOR i=1 TO data.getLength() -- length from data array! LET attributes[i].name = "blue reverse" END FOR
BEFORE DISPLAY CALL DIALOG.setCellAttributes( attributes )
ON ACTION modify_cell_attribute LET attributes[arr_curr()].name = "red reverse"
ON ACTION clean_cell_attribute LET attributes[arr_curr()].name = NULL