The information in this article applies to:
- Microsoft Visual FoxPro for Windows, version 3.0
- Microsoft FoxPro for Windows, versions 2.5x, 2.6x
- Microsoft FoxPro for Macintosh, versions 2.5x, 2.6x
SYMPTOMS
When the value displayed by an @ ... SAY object is refreshed, the
previously displayed text is not completely cleared from the screen. This
behavior will be most obvious when a short text string is displayed
immediately after a long text string.
CAUSE
The values may not be completely cleared if either of the following
conditions is true:
- The font of the window in which the text is being displayed is
smaller than the font of the text itself.
-or-
- The text is being displayed in Transparent mode rather than Opaque mode.
RESOLUTION
There are two ways to correct the problem of not properly clearing
previous SAY values:
- Change the font of the window to be the same font as, or a larger font
than the font used in the @ ... SAY objects that will be refreshed. For
example, you could change the DEFINE WINDOW command from the program in
the "More Information" section below to:
DEFINE WINDOW test FROM 1,1 TO 15,50 ;
FONT "TIMES NEW ROMAN",18 STYLE "N"
In the Screen Builder, you can change the window font by choosing Layout
from the Screen menu, choosing the Font push button from the Screen
Layout dialog box, and then selecting the new font for the window.
-or-
- Change the @... SAY objects from transparent to opaque (in the STYLE
clause). For example, change the @... SAY commands in the program below
to the following (both in the main procedure and in the READ LEVEL SHOW
procedure):
@ 1,8 SAY customer.company ;
FONT "TIMES NEW ROMAN", 18 STYLE "BQ" ;
SIZE 1,30
Note that the STYLE clause has been changed from "BT" (Bold,
Transparent) to "BQ" (Bold, Opaque).
In the Screen Builder, you can change the mode of the object by
first selecting the object, choosing Mode from the Object menu,
and then selecting Opaque.
MORE INFORMATION
Steps to Reproduce Problem
- Run the following program:
USE (SYS(2004)+'tutorial\customer.dbf') && (FoxPro 2.x)
* In Visual FoxPro, substitute the following line instead of the line
* above:
* USE (SYS(2004)+'samples\data\customer.dbf') && (Visual FoxPro)
CLEAR
DEFINE WINDOW test FROM 1,1 TO 15,50 ;
FONT "COURIER NEW",12 STYLE "N"
ACTIVATE WINDOW test
@ 1,8 SAY customer.company ;
FONT "Times New Roman",18 STYLE "BT" ;
SIZE 1,30
@ 5,10 GET choice ;
PICTURE "@*HN refresh" SIZE 2,8,1 ;
DEFAULT 1 VALID choiceval()
READ CYCLE SHOW rdshow()
RELEASE WINDOW test
CLOSE DATABASES
FUNCTION choiceval && choice VALID
SKIP
SHOW GETS
RETURN && END FUNCTION choiceval
FUNCTION rdshow && Read Level Show
@ 1,8 CLEAR TO 2,38
@ 1,8 SAY customer.company ;
FONT "TIMES NEW ROMAN", 18 STYLE "BT" ;
SIZE 1,30
RETURN && END FUNCTION rdshow
- When the window is activated, choose the Refresh push button several
times. Note that longer company names and the lower portion of the
company names are not cleared completely.
|