Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Iterating through form's controls
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00407951
Message ID:
00407983
Views:
28
Ok, I see the benefits of this idea. Currently I have default VFP class for the each Container (because it doesn't do anything), but I can change it to be my class instead with this method added. Thanks for your help, Larry.

>Personally, I would create a SetDefaultState method at the container level and have it iterate through its Controls collection to do the setting. I wouldn't access the container's controls from outside the container.
>
>Just my preference.
>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform