Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting focus to first object in form.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00382411
Message ID:
00382702
Vues:
27
Interesting... Will try it.

What happens if form contrains a pageframe? Perhaps it would be best to just check controls that are in same container as oFirstControl.

Thanks,

Alex

>Alejandro,
>Can you use the Controls or ControlCount properties and work through them looking for the first object with a parent class that is suitable (Text box, combo, etc.)? I don't know if the Controls array or the ControlCount list is ordered in the Tab order, but that's easy to check.
>
>HTH
>Barbara
>
>
>>Hi,
>>
>>A form class has two properties: cFirstControl and oFirstControl. The first one has the name and the second one a reference to the control that gets focus when we add record to table.
>>
>>Desired behavior:
>>
>>1) In Form init, if cFirstControl is name of a valid control, load a reference to it in oFirstControl. Otherwise, load a reference to the first object in tab order that makes sense (no labels, for example).
>>
>>2) As we navigate in table, if oFirstControl is disabled or otherwise unavailable, focus should go to next object that makes sense in tab order.
>>
>>TIA,
>>
>>Alex
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform