Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order of object creating for a form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00231124
Message ID:
00232403
Vues:
18
>One of the real limitations of VFP is that the programmer has no direct control over object firing order on a form. It is initially the order in which you add objects to a form, but it can be influenced in a limited way by the Zorder() method of an object.
>
>It would be best if VFP provided a zordering method like it provides for setting tab order. In fact there is a zorderindex property of each object on the form which is not, however, exposed. I have tried with limited success to directly edit the zorderindex in the .sct, but I am not entirely confident that one can do so without getting in trouble.
>
>So far, the best solutions I have found are (1) remove all of the objects from the form onto another temporary form, then move them back one at a time to the permanent form in the order in which you want them to fire or (2) bypass native firing order entirely and, at the form level, create an array of objects on the form which is sorted in the order in which you want objects to fire.

Note that I'm not advising this, one should not be dependent on instantiation order. But (theoretically speaking), all one has to do is change the scx record order of same-level objects, and this can be done by using Send-to-back/Bring-to-front or hacking the scx...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform