Home RAP

change the font color of a variable

edited April 2003 in RAP
Hi,

How can I chage the font color of a variable? and what it?s the event that I
must to use?

I want to change the color of a variable depending tha value of that
variable

Comments

  • edited April 2003
    Use the Variable's OnCalc event, as it fires early enough to perform this
    operation. I coded this in the main RAP demo #12 by adding a variable to the
    detail and coding the OnCalc:

    begin
    Value := plStock['Price_Chg'];


    if Value > 0 then

    Variable1.Font.Color := clBlack

    else

    Variable1.Font.Color := clRed;

    end;

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited April 2003
    Thanks

This discussion has been closed.