Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set property of controls in INIT of the form?
Message
 
 
To
22/02/2010 14:26:58
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01450293
Message ID:
01450311
Views:
54
Gregory, see my replied under your comments:

>Dmitry,
>
>Your test shows or demonstrates the normal behaviour
>
>A couple of possibilities
>
>(1) Change the properties of the controls you want in the form's init. I do not see a problem there

This is true. But I wanted the property set before a control's Init fires.

>
>(2) You could make some classes of controls to look at form properties, ie Adding properties to the form in the form's load(), then each of those controls could find out whether a certain property exists and use it in its init

This is a possibility. And I already tested this approach although Naomi found some holes in it.

>
>(3) BindEvent the init of the controls (post flag of bindevent) to a form's method, ie
>Change each control control class to bindEvent itself in the init to a form's method (not tested)
>Then in the form's method you can find out what control it is and act accordingly

I have never used BindEvent yet. And I am concerned that I will do something wrong (due to inexperience) and break the app. I prefer to spend some time to learn it first.

So I will probably go with approach 2 unless I find other issues (on top of what Naomi already suggested).

Thank you very much.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform