Purpose

.ForeColor allows you to specify which color is applied to the foreground of certain objects.
 

Syntax

Setting:         ObjectReference.ForeColor = Value

Retrieving:      Variable = ObjectReference.ForeColor
 

Operation

ObjectReference is the Tag Name of the object
Value is a RGB triplet string or a string holding a color name (see Color Values)
Variable is an alphanumeric variable

 

Remarks

Logical color names are defined in the Application Definitions File.

The color value retrieved is always the same as the value set, irrespective of any color mapping done by the operating system or display subsystem.
 

Examples

To set the .ForeColor property of a text string (Tag Name = CustomerNamePrompt) to green:

CustomerNamePrompt.FORECOLOR = "GREEN" or:

CustomerNamePrompt.FORECOLOR = "0,255,0"  or:

$GREEN = "GREEN"
CustomerNamePrompt.FORECOLOR = $GREEN

To set the .ForeColor for the Visa Radio Button label to the logical name "RED".  (The Windows Client is at liberty to map this to another color through a color mapping specified in the Application Definitions File):

CreditCardGroup.Button(VisaButton).ForeColor = "RED"

To retrieve the .ForeColor from the same Visa Radio Button label into the contents of $VISALABELCOLOR.  (The value should be the string "RED"):

$VISALABELCOLOR = CreditCardGroup.Button(VisaButton).ForeColor
 

Comment on this topic

Topic ID: 510060