PRB: Old Prompt Visible on Check Boxes and Radio Buttons

ID: Q135327

2.50b 2.50c 2.60a MACINTOSH kbtool kbprb

The information in this article applies to:

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
Keywords          : FxtoolSbuilder 
Version           : 2.50b 2.50c 2.60a
Platform          : MACINTOSH

Last Reviewed: May 17, 1996