Options

Column BackColor in a matrix

vanwerovanwero Member Posts: 28
Hi you all,

is it possible te give a specific column in a matrix a color?

In my matrix the columns represents a date and I want to give the weekends and hollidays a red color for example! Is this possible for a matrix?

Greets and thanks!

Comments

  • Options
    jhoekjhoek Member Posts: 216
    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. :(
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • Options
    alanperualanperu Member Posts: 23
    Hi,

    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.
  • Options
    sggsgg Member Posts: 109
    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.
    Sunday, Godwin G
  • Options
    beetlestonebeetlestone Member Posts: 46
    Although the options are limited, you could conditionally set the cell property SELECTED as follows

    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/
    Darren Beetlestone
Sign In or Register to comment.