The information in this article applies to:
- Microsoft FoxPro for Windows, versions 2.5x, 2.6, 2.6a
- Microsoft FoxPro for Macintosh, versions 2.5x, 2.6a
SYMPTOMS
Changing the prompt of a check box using the PROMPT <expC> clause in either
the SHOW GET or SHOW OBJECT command causes the new prompt to be displayed
on top of the existing prompt.
WORKAROUND
Please note that this workaround does not apply to FoxPro for Macintosh.
There is no workaround for the Macintosh product.
To work around this problem in FoxPro for Windows, do the following:
- From the Object menu, choose Font. Change the check box font to a
nonproportional font, such as FoxFont or Courier.
- From the Object menu, choose Mode. Change the check box mode to Opaque.
- Add spaces to the check box prompt "\<Checked " in the check box's
VALID clause, so that its length is equal to the longest prompt,
"\<Unchecked", as in the example below:
IF x=0
SHOW GET x,1 PROMPT "\<Unchecked"
ELSE
SHOW GET x,1 PROMPT "\<Checked "
ENDIF
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
Steps to Reproduce Problem
- Start FoxPro. From the File menu, choose New. In the New dialog box,
select Screen, and then choose the New button.
- Add a check box.
- In the Check Box Prompt text box, type "\<Unchecked" (without the
quotation marks).
- In the Variable text box, type "X" (without the quotation marks).
- Choose the Valid button, and then type the following code in the
Procedure editing window:
IF x=0
SHOW GET x,1 PROMPT "\<Unchecked"
ELSE
SHOW GET x,1 PROMPT "\<Checked"
ENDIF
- Choose OK twice to return to the Screen Design window.
- From the Program menu, choose Generate. Save the screen as TEST.SCX, and
then generate TEST.SPR.
- In the Command window, type "DO TEST.SPR" (without the quotation marks),
or choose Do from the Program menu to run the screen program file.
Note that the shorter prompt, "Checked," does not replace the longer
prompt, "Unchecked."
|