Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving focus programmatically
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00918346
Message ID:
00918351
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
Alessio, in textbox.keypress put:

DO CASE
CASE nkeycode=13
thisform.thegrid.SetFocus
nodefault
CASE nkeycode = 9
thisform.thecontainder.SetFocus
NODEFAULT
OTHERWISE
DODEFAULT()
ENDCASE

in every textbox contained in the grid put this code in the .keypress event

IF nkeycode = 9
thisform.thetextbox.SetFocus
NODEFAULT
ELSE
DODEFAULT()
ENDIF

ciao
(scusa per l'inglese:))

Faanco

>I have a form with a textbox, a grid and a conteiner with some buttons, what i'd like to do is :
>
>a) When I am inside the textbox and press enter key i should go inside the grid
>
>b) if I am inside the grid and press the tab key i should go inside the textbox
>
>c) if I am inside the textbox and press the tabkey I should go inside the container
>
>I put the grid.allowcellselection to .T.
>
>What i get at the moment is that pressing tab inside the grid i can see the focus going to the textbox for a while then immediatelly to the container.
>I hope i was clear in expplaining
>
>Thanks
>ALessio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform