PRB: Menu Pad or Prompt Shows Wrong Letter Highlighted

ID: Q115002

The information in this article applies to:

SYMPTOMS

A menu pad or menu-bar prompt with a hot key defined on the second or later occurrence of the same-case letter displays the underline on the first occurrence of that character.

RESOLUTION

For letters that occur more than once in a prompt, either choose the first occurrence for the hot-key letter, or, in the case of a letter that repeats just once, distinguish one instance with uppercase, the other with lowercase.

MORE INFORMATION

In FoxPro version 2.0 for MS-DOS, the aforementioned behavior occurs and is documented on page C3-283 of the "Commands & Functions" manual; however, the example describing how to reproduce the behavior does not do so, because of the difference in the case of the letters within the prompt.

In FoxPro version 2.5 and later for MS-DOS, the behavior also occurs, but it is not documented on page L3-395 in the "Language Reference."

In FoxPro version 2.5 and later for Windows, the behavior does not occur.

Steps to Reproduce Problem

NOTE: The following example uses two menu bars on a menu popup to show the problem, but two menu pads could be used instead.

1. In the Command window, issue the following command

      CREATE MENU Cities

   and in the Prompt box, type:

      Cities

2. Choose the Create button and enter two prompts for the Cities pad:

      Alb\<any
      Schen\<ectady

3. Choose the Try It button to run the menu.

4. Choose the Cities menu pad.

Note that in the Albany prompt, the second "a" is highlighted, as expected; however, in the Schenectady prompt, the first "e", not the second, has the highlight. Distinguishing the letters by case makes a difference and produces the desired result.

REFERENCES

"Language Reference," version 2.5, page L3-395 "Commands & Functions," version 2.5, page C3-283

Additional reference words: FoxDos 2.00 2.50 2.50a 2.50b 2.60 KBCategory: kbprg kbprb KBSubcategory:

Last Reviewed: April 18, 1995