Change color of a subform’s rows

Guga84Guga84 Member Posts: 24
Is there any way of changing the background color in some rows in a form?

Comments

  • SavatageSavatage Member Posts: 7,142
    you can change the text color - but other thats pretty much it. Background can be altered in reports by using bitmaps but not forms as far as i know.
  • krikikriki Member, Moderator Posts: 9,110
    Guga84 wrote:
    Is there any way of changing the background color in some rows in a form?
    On-the-fly changing of colours is only possible with the foreground.
    You need to put some code in the OnFormat-trigger of each field:
    CurrForm."The Field".UPDATEFORECOLOR(intTheColour);
    
    So if you need to calculate the colour-value, best put it in the OnAfterGetRecord-trigger and don't repeat it in each OnFormat-trigger.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.