General information
Category:
Forms & Form designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only