Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Go To First Field On Add In Class?
Message
De
19/06/1998 10:01:04
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapour
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00109814
Message ID:
00109886
Vues:
43
If I understand correctly, both your methods require me to specify the first field.

I remember I have seen a method which doesn't require me to meddle with each form. Any idea?


>Another option, almost identical is have the property on the form as an OBJECT reference and have it set from the init object of what should be the first object during add mode. You can do the same for an edit mode if some fields are disabled...
>
>ex: in the objects init() method
>
>Thisform.oFirstField = This
>
>Then on the click event you won't have to worry about spelling or object name accuracy, periods, etc that might inadvertently change.
>
>ex: button click event
>
>Thisform.oFirstField.setfocus()
>
>If you do it this way, be sure to clear the field before closing within the forms destroy event. Otherwise with a "dangling object", the form won't clear.
>
>Thisform.oFirstField = ""
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform