Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to come out of container
Message
 
To
12/02/2012 01:42:49
Mk Sharma
Shrishti Solutions
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01535170
Message ID:
01535244
Views:
115
>i have set the TabStop=.F. for all CommandButtons in Container but after this when i press Up/Down arrow to goto next/Previous CommandButton then also it comes out of Container.
>
>may you send me a sample form at :
>mk_common@yahoo.com
>
>Thanks & Warm regards,
>mk.

First I have to say you might be putting too much work into making a form keyboard friendly. My observations watching users today ( and I see a lot of them ) is that just about all of them only use the mouse for these operations.

Having said that, the only way I can think of that you can get the thing to work the way you want is to put code in the KeyPress Event of each button to have the arrow keys set focus to the next desired button. Here is a sample:

In this example you are sitting on Button 2. Placing this code in Button two would cause the Button 1 or Button 3 to get focus depending on what key was hit. For up (5) and down (24) arrows use these values. You would need to place this code in every button you want to control changing the target buttons in each one. By the way, leave the tab off.
 Lparameters nKeyCode, nShiftAltCtrl
*
If nKeyCode = 19 && Left Arrow
  Thisform.cntMenu.cmdButton1.SetFocus()
  NoDefault
Else
  If nKeyCode = 4 && Right Arrow
    Thisform.cntMenu.cmdButton3.SetFocus()
    NoDefault
  Endif
Endif
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform