|
|
|
|
|
- Overview
- Changing the text color
- Changing the background color
- Differences between Table controls based on a data file and populated programmatically
Defining colors in Table controls
The colors of a Table control (row background, text of rows, etc.) are defined in the control description window. They can be modified using the following properties: Note: You can define the cell frame and its color using the Border property.. To modify the color of the text: - for all the columns of the Table control:
<Table control>.Color = <Color value> - for a column:
<Column control>.Color = <Color value> - for a row of the Table control:
<Table control>[<Row>].Color = <Color value>
<Column>[<Row>].Color = <Color value> - for a cell of the Table control:
<Table control>[<Row>][<Column>].Color = <Color value>
<Column control>[<Row>][<Column>].Color = <Color value>
In these syntaxes: - <Table control>:
Table control name. - <Column control>:
Column name. - <Row>:
Integer used to identify the row to modify. There is no need to specify this parameter if the row to modify is the current row. - <Column>:
Number of the column that contains the cell to be modified. The column numbers include all the columns, even the ones that are hidden or inactive. The first column (on the left) is column #1, the second one is column #2... - <Color value>:
Integer containing the value of the color. This value can correspond to:
Note The color DefaultColor does not cancel the color change for the entire Table control. Changing the color of the Table control means changing the style of the control, and the new color becomes the default color. To change the color of a Table control and then to go back to the previous color, you must change it row by row or column by column. Examples:
TABLE_Table1.Color = LightYellow
TABLE_Table1.Color = RGB(10,0,90)
COL_NAME.Color = LightYellow
COL_NAME.Color = RGB(10, 0, 90)
COL_NAME.Color = DefaultColor
IF COL_Amount > 10 THEN
TABLE_Table1[TABLE_Table1].Color = LightRed
END
TABLE_Table1[TABLE_Table1].Color = DefaultColor
TABLE_Table1[10][2].Color = DarkBlue
TABLE_Table1[10][2].Color = DefaultColor
Changing the background color To change the background color: - for all the columns of the Table control:
<Table control>.BackgroundColor = <Color value> - for a column:
<Column control>.BackgroundColor = <Color value> - for a row of the Table control:
<Table control>[<Row>].BackgroundColor = <Color value>
<Column control>[<Row>].BackgroundColor = <Color value> - for a cell of the Table control:
<Table control>[<Row>][<Column>].BackgroundColor = <Color value>
<Column control>[<Row>][<Column>].BackgroundColor = <Color value>
In these syntaxes: - <Table control>:
String containing the name of the Table control. - <Column control>:
String containing the name of the column. - <Row>:
Integer used to identify the row to modify. There is no need to specify this parameter if the row to modify is the current row. - <Column>:
Number of the column that contains the cell to be modified. The column numbers include all the columns, even the ones that are hidden or inactive. The first column (on the left) is column #1, the second one is column #2... - <Color value>:
Integer containing the value of the color. This value can correspond to:
Examples:
TABLE_Table1.BackgroundColor = LightYellow
TABLE_Table1.BackgroundColor = RGB(10,0,90)
COL_NAME.BackgroundColor = LightYellow
COL_NAME.BackgroundColor = RGB(10, 0, 90)
COL_NAME.BackgroundColor = DefaultColor
IF COL_Amount > 10 THEN
TABLE_Table1[TABLE_Table1].BackgroundColor = LightRed
END
TABLE_Table1[TABLE_Table1].BackgroundColor = DefaultColor
TABLE_Table1[10][2].BackgroundColor = DarkBlue
TABLE_Table1[10][2].BackgroundColor = DefaultColor
Differences between Table controls based on a data file and populated programmatically Table control populated programmatically- The new colors in the Table control are preserved until they are changed again.
- The color change associated with a line or cell is memorized: when the contents of the Table control are programmatically dequeued (vertically and horizontally), the color change associated with the line or cell remains "active".
Table control based on a data file - The new colors in the Table control are preserved until they are changed again.
- The color change associated with a line or cell is not memorized: when dequeueing (vertically and horizontally) the contents of the Table file field, the color change associated with the line or cell is lost when the line "exits" the Table control.
To preserve the new color, it must be called in the display process of a row in the Table control.
Example: display the cell in red if REMAINING to pay >10 IF COL_AMOUNT > 10 THEN TABLE_Table1[TABLE_Table1][2].Color = LightRed // COL_AMOUNT is the second column of the Table control // TABLE_Table1[TABLE_Table1][2] represents the cell that corresponds to // column 2 for the current row. END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|