Microsoft KB Archive/95252

{| = Setting Color for GET Fields in Screen Builder =
 * width="100%"|

ID: Q95252

The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a

SUMMARY
You may be able to change the color for an individual GET field in a screen by adding an expression to the WHEN, VALID, or MESSAGE clause. This technique works properly only for GET fields for which the screen generator does not automatically generate a color scheme clause.

MORE INFORMATION
For example, to change the foreground to white and the background to black for a GET field, you can enter the following expression in the WHEN or VALID clauses of the GET object. The Expression radio button should be selected for these clauses.

.t. COLOR ,W/N If entered in the MESSAGE clause, the expression should have the following syntax: &quot; &quot; COLOR ,W/N The VALID and WHEN clauses expect a logical to be returned, and the MESSAGE clause expects a character string. If the same color is chosen for the foreground and background, such as N/N, password entry can be simulated.

The color for lists and popups cannot be changed in these clauses. If the COLOR clause is added, a syntax error message will result when the .SPR is run. The Screen Builder generates color scheme clauses for lists and popups.

When you are sending color clauses to the control GET fields (push buttons, radio buttons, and check boxes), the color combination must be preceded by eight commas instead of one.