PRB: Background Color of @ ... SAY or @ ... GET is Wrong

ID: Q129403

The information in this article applies to:

SYMPTOMS

An @ ... GET or @ ... SAY object that uses a COLOR clause is displayed with the wrong background color.

CAUSE

The color pair strings in the COLOR clause are enclosed by quotation marks.

RESOLUTION

Do not use quotation marks to enclose the color pairs.

Note: In FoxPro 2.6 for MS-DOS, the correct colors are displayed regardless of whether the color pair string is enclosed by quotation marks.

MORE INFORMATION

The following code should display the text with a blue foreground and a gray background:

   @1,1 SAY "test" COLOR "b+/w"
   x="text"
   @1,1 GET x COLOR ",b+/w"

The foreground color is displayed correctly but not the background color.

Without the quotation marks around the color pair string, both the foreground and the background colors are displayed correctly, as illustrated with the following code:

   @1,1 SAY "test" COLOR b+/w
   @1,1 GET x COLOR ,b+/w

Additional reference words: 2.60a FoxDos @...GET @..GET @...SAY @..SAY KBCategory: kbprg kbdisplay kbprb KBSubcategory: FxprgGeneral

Last Reviewed: May 4, 1995