BUG: SHOW ... PROMPT is Displayed on Top of Existing Prompt

ID: Q121924

The information in this article applies to:

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:

1. From the Object menu, choose Font. Change the check box font to a

   nonproportional font, such as FoxFont or Courier.

2. From the Object menu, choose Mode. Change the check box mode to Opaque.

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

1. Start FoxPro. From the File menu, choose New. In the New dialog box,

   select Screen, and then choose the New button.

2. Add a check box.

3. In the Check Box Prompt text box, type "\<Unchecked" (without the

   quotation marks).

4. In the Variable text box, type "X" (without the quotation marks).

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

6. Choose OK twice to return to the Screen Design window.

7. From the Program menu, choose Generate. Save the screen as TEST.SCX, and

   then generate TEST.SPR.

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

Additional reference words: FoxMac FoxWin 2.50 2.50a 2.50b 2.50c 2.60 2.60a monospaced non-proportional buglist2.50 buglist2.50a buglist2.50b buglist2.50c buglist2.60 buglist2.60a KBCategory: kbprg kbbuglist kbtshoot KBSubcategory: FxprgGeneral

Last Reviewed: June 27, 1995