Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
When I have controls that depend on other controls, such as combo boxes whose contents depend on values from another combo box, etc., an approach I often use is to have a property lInited at the form level that I set as part of the form INIT. I check in the control INIT or other method that may fire during control instantiation for thisform.lInited and if .F., not run code that will fail if the dependent control hasn't INITed yet. An example might be a control that loads with data and has an InteractiveChange event that does something to another control that might not have instantiated yet.
In my custom after_init method or just later in the form INIT, I'll sequence through the desired controls and call the methods that could have failed during instantiation to finish loading data, etc.
Gary
>Is it possible to force Foxpro to instantiate the objects on a form in a specific order? If so, how?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement