KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to set the default color for negative values in 4D Calc
PRODUCT: 4D Calc | VERSION: 6.7 | PLATFORM: Mac & Win
Published On: May 18, 2001

When using 4D Calc areas, you will notice that negative numbers are displayed in red and that null values are displayed in pink. If you want to display alternative colors, use the SP DEFAULT COLOR command.

When put in the form method for the form in which the 4D Calc area is located, the following code sets the default color for negative values to blue, and for null values to red in the area "Field3".

Case of
: (Form event=On Load )
SP DEFAULT COLOR (Field3;SP RGB to color (0;0;65535);SP RGB to color (65535;0;0))
End case