Menu Option Buttons Not Highlighted When Using a Mouse

ID: Q88997

2.00 2.5x 2.6x | 2.5x 2.6x

MS-DOS         | WINDOWS
kbprg

The information in this article applies to:

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 "next" object. When the user uses the mouse, the "next" object is not indicated because the mouse can click anywhere on the screen. Therefore, it does not matter which control is "current" or which control is "next."

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 "Choose the other one"
    ACTIVATE MENU main

    @18,25 GET xyz;
       PICTURE "@*HN \<ADD;\<Cancel;\<Ignore";
       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

Last Reviewed: November 20, 1995