Menu Option Buttons Not Highlighted When Using a Mouse

Last reviewed: November 19, 1995
Article ID: Q88997
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 "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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 19, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.