Microsoft KB Archive/115002

{| = PRB: Menu Pad or Prompt Shows Wrong Letter Highlighted =
 * width="100%"|

ID: Q115002

The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, 2.5b, 2.6

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.