Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting first field and exiting last
Message
 
À
08/11/1998 10:55:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00155566
Message ID:
00155585
Vues:
17
Vicki,
While you can work with the Controls collection (it contains all the controls on a given form) and the tabindex, it's probably easier to just add a Setfocus() command to your ADD code and a SAVE.CLICK() command to your last field.

If you want, you can store the control names for the first and last fields in a form property, and your ADD and SAVE routines can refer to these values. For the latter, you might also have your textbox control (you DO have a subclassed version?) check the form value to see if it's the last control.

HTH
Barbara

>I've recently converted a DOS-based CLipper program to VFP 5 for a client. In addition to all the great new features, I've tried to keep some of the old "fancy" keystrokes we had added to the DOS-based program to spruce it up. This keeps the clients happy, reduces training time and the "jump to Windows" anxiety for the users. I've managed to wrestle VFP into compliance while teaching myself OOP, VFP and Windows programming jargon but I'm stumped on one set of features: I'd like to have the cursor go to the first field of a form on an Add/Copy and automatically call the SAVE routine when they press ENTER/TAB on the last field.
>
>I know I could do this by putting code into the appropriate fields on each form but I'd prefer to do this from a more OOP-correct angle. Is there a method or property I can check/use to determine which field is first and/or last and set up a procedure that uses these when appropriate? Or do I need to set properties in my base classes and jump thru hoops from there? Any suggestions would be appreciated.
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform