Microsoft KB Archive/88997

{| = Menu Option Buttons Not Highlighted When Using a Mouse =
 * width="100%"|

ID: Q88997

2.00 2.5x 2.6x | 2.5x 2.6x

MS-DOS        | WINDOWS kbprg The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6x
 * Microsoft FoxPro for Windows, versions 2.5x, 2.6x

SUMMARY
If an application has a menu option that brings up a screen that has a button as its first object, whether the button is highlighted depends on how the user chooses the menu option. If the user chooses the menu option with the mouse, the button is not highlighted. If the user chooses the menu option with the keyboard, the button is highlighted.

FoxPro uses the highlight with the TAB key to convey the concept of the &quot;next&quot; object. When the user uses the mouse, the &quot;next&quot; object is not indicated because the mouse can click anywhere on the screen. Therefore, it does not matter which control is &quot;current&quot; or which control is &quot;next.&quot;

Workaround
In the WHEN clause of the push button, place the following procedure:

KEYBOARD '{rightarrow}' KEYBOARD '{leftarrow}' This will cause the focus to shift to the following push button and then back to the first push button. In order to work, this workaround requires more than one push button.

MORE INFORMATION
The following code demonstrates this situation:

CLEAR DEFINE MENU main BAR AT LINE 3 DEFINE PAD one OF main PROMPT '\<this one' DEFINE PAD two OF main PROMPT '\<two' ON PAD one OF main DO proc1 ON PAD two OF main WAIT WINDOW &quot;Choose the other one&quot; ACTIVATE MENU main

@18,25 GET xyz; PICTURE &quot;@*HN \<ADD;\<Cancel;\<Ignore&quot;; SIZE 1,8,1 DEFAULT 1 READ CYCLE Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b 2.60 2.60a KBCategory: kbprg KBSubcategory: FxprgGeneral Keywords         : FxprgGeneral Version          : 2.00 2.5x 2.6x | 2.5x 2.6x Platform         : MS-DOS WINDOWS
 * }