BUG: COLOR on @...GET Push Button Does Not Work as Expected

Last reviewed: April 25, 1997
Article ID: Q143306
The information in this article applies to:
  • Microsoft FoxPro for Macintosh version 2.6a
  • Microsoft FoxPro for Windows, version 2.6a
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a

SYMPTOMS

It is possible to change various push/command button attributes by using the COLOR clause, even though the Help file and Language Reference states that the COLOR clause works only in FoxPro for MS-DOS.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The Help file states that the COLOR clause is useful for FoxPro for MS-DOS only. This is also documented on pages 111-112 in the Language Reference for FoxPro for Windows 2.6 and page 114 of the FoxPro for the Macintosh Language Reference. @...GETs are not documented in the Visual FoxPro documentation. The following is taken from the Visual FoxPro and FoxPro 2.6 for Windows and Macintosh Help file:

   In FoxPro for Window and FoxPro for Macintosh, the COLOR clause does
   not affect the color of push buttons.

In FoxPro versions 2.6a and 3.0 for Windows, it is possible to change the color of a disabled button prompt.

In FoxPro version 2.6a for Macintosh, it is also possible to change the color of the entire button face, provided the height of the SIZE clause is set to 1 row.

Example to Demonstrate Problem

Enter the following code into a new program, save it, and use the DO command to run the program:

FoxPro for Windows:

   CLEAR
   @ 2,2 GET mchoice FUNCTION '* \<OK;\<CANCEL;\\DISABLED';
      COLOR ,,,,,,,,,R+/B+  DEFAULT 1
   READ

   This will display two default buttons with the disabled button's prompt
   in red.

FoxPro for Macintosh:

   CLEAR
   @ 2,2 GET mchoice FUNCTION '* \<OK;\<CANCEL;\\DISABLED';
      COLOR ,,,,,,,,W/BG+,R+/B+ DEFAULT 1

   @ 10,2 GET mchoice FUNCTION '* \<OK;\<CANCEL;\\DISABLED';
      COLOR ,,,,,,,,W/BG+,R+/B+ SIZE 1.5,1,1 DEFAULT 1
   READ CYCLE

   The first @...GET displays three push buttons with a cyan button face.
   The disabled button text will be red. The second @...GET displays all
   three button faces with the default Macintosh Windows color because of
   the added SIZE clause that sets the height to 1.5 rows. The disabled
   text will be red.


KBCategory: kbprg kbbuglist
KBSubcategory: FxprgGeneral FoxMac FoxWin vfoxwinbuglist2.60a buglist3.00
buglist3.00b buglist5.00
Additional reference words: 5.00 2.60a 3.00 3.00b
Keywords : buglist2.60a buglist3.00 FoxMac FoxWin FxprgGeneral vfoxwin vfpbug5.0a kbprg kbbuglist
Version : 2.6a 3.0 3.0b 5.0 5.0a
Platform : MACINTOSH WINDOWS
Issue type : kbbug


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 25, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.