Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Iterating through form's controls
Message
 
 
À
22/08/2000 16:43:46
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00407951
Message ID:
00407993
Vues:
39
Cindy,

>What about :
>
>FOR EACH oControl IN THIS.Controls
>    oControl.MyProperty = SomeValue
>ENDFOR
>
Thanks for your input. I'm going to do it this way, having Container1 as 'this'.
(See my reply to Larry). I think, it should be faster, than the idea, I proposed originally (e.g. naming each control explicitly), though I'm not sure.

>>Hi everyone,
>>
>>I have one very complicated form with pageframe with 8 pages. 6 first pages have Container1 on it. In each Page.Container1 I have bunch of different controls (criteria). I'd like to write a Form method SetDefaultState with would set each control (criterion) to its default state. Now my question is: what would be better from optimization point of view: use this construction:
>>
>>with this.PageFrame.Page1.Container1
>>    .control1.SetDefaultState()
>>    .control2.SetDefaultState()
>>    etc.
>>endwith
>>
>>with this.PageFrame.Page2.Container1
>>    .control1.SetDefaultState()
>>    .control2.SetDefaultState()
>>    etc.
>>endwith
>>  etc.
>>
>>
>>Or iterate through form's collection (not sure, how to do it)?
>>
>>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform