|
|
|
|
|
- Overview
- Changing the text color
- Changing the background color
- Differences Table field linked to a data file/Table field 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.Couleur = LightYellow
TABLE_Table1.Couleur = RGB(10,0,90)
COL_NOM.Couleur = LightYellow
COL_NOM.Couleur = RGB(10,0,90)
COL_NOM.Couleur = DefaultColor
IF COL_Montant > 10 THEN
TABLE_Table1[TABLE_Table1].Couleur = LightRed
END
TABLE_Table1[TABLE_Table1].Couleur = DefaultColor
TABLE_Table1[10][2].Couleur =DarkBlue
TABLE_Table1[10][2].Couleur = 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.CouleurFond = LightYellow
TABLE_Table1.CouleurFond = RGB(10,0,90)
COL_NOM.CouleurFond = LightYellow
COL_NOM.CouleurFond = RGB(10,0,90)
COL_NOM.CouleurFond = DefaultColor
IF COL_Montant > 10 THEN
TABLE_Table1[TABLE_Table1].CouleurFond = LightRed
END
TABLE_Table1[TABLE_Table1].CouleurFond = DefaultColor
TABLE_Table1[10][2].CouleurFond = DarkBlue
TABLE_Table1[10][2].CouleurFond = DefaultColor
Differences Table field linked to a data file/Table field 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 row or cell is memorized: when dequeuing (vertically and horizontally) the contents of the Table control, the color change associated with the row or cell remains "active".
Data-bound Table control - The new colors in the Table control are preserved until they are changed again.
- The color change associated with a row or cell is not memorized: when dequeuing (vertically and horizontally) the contents of the Table control, the color change associated with the row or cell is lost when the row "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
END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|