Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Negative Grid Values in Red
Message
 
To
31/08/1998 09:03:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00131466
Message ID:
00131512
Views:
12
>Jim,
>
>Thanks for the reply and we're on the right track. I'd like to narrow the "red cells" to include only those cells that are negative. Right now the code changes the forecolor of the entire row in all columns. Ideally those cells which are positive are black and negative cells are red.
>
>Thanks in Advance.
>
>Scott

Scott,

Try something like this in the Grid's Init;
FOR EACH Col IN THIS.Columns
   IF TYPE(Col.ControlSource) = "N"
      Col.DynamicForeColor = "IIF(THIS.Text1.Value < 0,RGB(255,0,0),RGB(0,0,0))"
   ENDIF
ENDFOR
The above code assumes you have left the cotrol in the column as the textbox. You can also directly set the DynamicForeColor property in the form designer.
Previous
Reply
Map
View

Click here to load this message in the networking platform