Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keyboard {enter}
Message
De
21/07/2008 15:53:50
 
 
À
21/07/2008 14:17:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01331438
Message ID:
01332941
Vues:
6
>>>Hi,
>>>
>>>When press the commandbutton (represents enter key) is pressed, the focus will shift from textbox2 to textbox3. Thanks
>>
>>How about this......(completely untested)
>>
>>Create a Form Property named (something like) LastTextBox.
>>In the Valid of each textbox put
thisform.LastTextBox = this
>>In the click event of the command button put
thisform.LastTextBox.setFocus
>>KEYBOARD {ENTER}
>>
>
>I would not save any form's object reference in a property of that form.
>Think that form would not close any more

I did a quick test (six textboxes and one command button with no underlying logic) and the form closed ok. I suppose you could also put a "thisform.LastExtBox = .NULL." somewhere in the Release or Destroy or some other method.

Actually, I think my second method (although slightly more difficult to maintain) works much better. The first one has problems when you get past the last textbox and/or have other controls you don't want to reach via the command button.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform