PRB: Old Prompt Visible on Check Boxes and Radio Buttons

Last reviewed: May 16, 1996
Article ID: Q135327
The information in this article applies to:
  • Microsoft FoxPro for Macintosh, versions 2.5b, 2.5c, and 2.6a
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6, and 2.6a

SYMPTOMS

The new prompts for check boxes or radio buttons overstrike rather than replace the existing prompts.

RESOLUTION

To fix the behavior, change the mode of the radio button or check box from Transparent to Opaque. For best results, use a fixed-space font such as Courier New or Foxfont. Using a proportional font such as a Times New Roman or Arial may produce unpredictable and undesirable results. This is because the width of the new prompt may vary from the old prompt due to fontmetric attribute differences; therefore when you change prompts, portions of the previous prompt may be visible.

STATUS

This behavior is by design.

MORE INFORMATION

The "SHOW GET <object name> PROMPT <new prompt text>" command can be used to change the text of a prompt of an object in FoxPro. For example, a check box may initially have a prompt of Off. Then, when the check box has been toggled by the user, the prompt of the check box can change to On.

Steps to Reproduce Behavior

  1. Create a new screen by typing CREATE SCREEN in the command window.

  2. Place a check box item on the screen.

  3. Give the check box a Prompt of Off.

  4. Name the variable for the check box, cbox1.

  5. In the VALID code of the check box, place the following lines of code:

    SHOW GET cbox1 PROMPT 'On' SHOW GETS

  6. Close the VALID code, and generate the screen.

  7. Run Prompts.spr, and click the check box. Notice that the word On overstrikes the original prompt of the check box.

Steps to Resolve Prompt Overstrike

Using the Prompts screen created in the "Steps to Reproduce Behavior" section of this article:

  1. Type MODIFY SCREEN prompts in the Command window.

  2. Select the check box, cbox1.

  3. On the Object menu, click Mode and then Opaque.

  4. Regenerate the screen, and notice that when you click the check box, the new prompt replaces rather than overstrikes the existing prompt.


Additional reference words: FoxMac 2.50 2.50a 2.50b 2.50c 2.60 2.60a
overwrite
KBCategory: kbtool kbprb
KBSubcategory: FxtoolSbuilder


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: May 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.