Perhaps this should be in an FAQ or something... ;-)
Columns in a table box can be given a background colour at design time; in a matrix box you can only assign a background colour to all columns in the right-hand side pane not at run-time at design-time.
At run-time, you cannot change these background colours.
For Instance on The Absence Overview By Period Matrix
if "Total Absence">0 then
begin
CurrForm."Total Absence".UPDATEFORECOLOR(255);
CurrForm."Total Absence".UPDATEFONTBOLD(true)
End;
will Make the Absences BOLD and RED (ForeColour)
However, to change the BackColour , you may simply Make it Selected e.g
CurrForm."Total Absence".UPDATESELECTED(true);
Add your codes to OnFormat Trigger of the TextBox in Quaestion
This will simply Reverse the Cell Colour.
On the other hand, if you want to "Paint" the whole Column, then you will not need a condition.
Comments
Columns in a table box can be given a background colour at design time; in a matrix box you can only assign a background colour to all columns in the right-hand side pane not at run-time at design-time.
At run-time, you cannot change these background colours.
Jan Hoek
Product Developer
Mprise Products B.V.
I had this same issue, but decided to change the forecolor of the text within the matrix on weekends - seems to work ok.
You need to do this on the OnFormat trigger.
HTH.
if "Total Absence">0 then
begin
CurrForm."Total Absence".UPDATEFORECOLOR(255);
CurrForm."Total Absence".UPDATEFONTBOLD(true)
End;
will Make the Absences BOLD and RED (ForeColour)
However, to change the BackColour , you may simply Make it Selected e.g
CurrForm."Total Absence".UPDATESELECTED(true);
Add your codes to OnFormat Trigger of the TextBox in Quaestion
This will simply Reverse the Cell Colour.
On the other hand, if you want to "Paint" the whole Column, then you will not need a condition.
IF <Condition> THEN
BEGIN
CurrForm.<MatrixControl>.UPDATEFORECOLOR(255);
CurrForm.<MatrixControl>.UPDATESELECTED(TRUE);
END;
It will only highlight the cell with a BLUE background, but makes things easily identifiable.
\:D/