COLOR WHERE Attribute
The COLOR WHERE
attribute defines a condition to
set the foreground color dynamically.
Syntax
COLOR = color-name [...] WHERE bool-expr
- color-name can be
BLACK
,BLUE
,CYAN
,GREEN
,MAGENTA
,RED
,WHITE
, orYELLOW
. - color-name can also be an intensity keyword:
REVERSE
,LEFT
,BLINK
, andUNDERLINE
. - bool-expr defines a boolean expression with a restricted syntax.
Usage
The attribute COLOR WHERE
defines a conditional color. The color will be applied
if the condition is true.
The condition in COLOR WHERE
can only reference the field for which the attribute is set.
Example
EDIT f001 = item.price, COLOR = RED WHERE f001 < 0;
Note: With form fields such as
EDIT
, BUTTONEDIT
the
RED
color will be applied when leaving the field. The color will not change while
editing the value.