General information
Category:
Forms & Form designer
ok , speravo potessi gestire il tutto da un evento a livello grid o form...
vorrà dire che utilizzerò la classe grid personalizzata che mi avevi suggerito il mese scorso :-))
PS Se capiti dalle parti di Latina, sappi che ci avanzi una Pizza :-)
>Non va bene quello che avevo già scritto?
>Per ogni textbox della grid inserisci (nell'evento keypress):
>
>IF nkeycode = 9
> thisform.thetextbox.SetFocus
> NODEFAULT
>ELSE
> DODEFAULT()
>ENDIF
>
>Altrimenti non ho capito cosa intendi....
>
>>Ok, Franco ti nomino mio salvatore personale !!!! :-))
>>cmq... il codice che mi hai dato funziona, io mi ero impicciato con il keypress del form....ma come faccio per uscire dal grid con il TAB e riposizionarmi sulla casella di testo ?
>>
>>Ok Franco, it seems like you were my personal tutor :-))
>>Anyway, te code works fine but what should I do to exit with the tab key from the grid an set the focus on the textbox ?
>>
>>
>>>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