Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does Refresh on a container call Refresh on the children
Message
 
À
07/07/2009 13:33:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01410630
Message ID:
01410633
Vues:
68
>When you call Refresh() on a container, does it then call Refresh() on the children objects?

Yes, they do, and might even do exponentially. If you put the following code into the Refresh event of a container:
Thisform.Caption = Transform(Val(Thisform.Caption)+1)
DoDefault()
and then nest three of them, you have a total of 7 refresh calls. If you use DODEFAULT() in a Refresh method, you must use NODEFAULT, otherwise every contained control is refreshed twice, their contained controls 4 times, and so forth. That's a great way to slow down an application that requeries a combobox in the Refresh event of some innermost container and might make a SQL server query before. <g>
--
Christof
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform