Setting Color for GET Fields in Screen Builder

Last reviewed: April 17, 1995
Article 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:

   " " 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.

REFERENCES

"Developer's Guide," pages D14-40 to D14-41 "Commands & Functions," page C3-23


Additional reference words: FoxDos 2.00 2.50 2.50a
KBCategory: kbprg
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 17, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.