General information
Category:
Coding, syntax & commands
>>
>>Another thing you can do is populate the control sources of the controls in >the Init() of the form...
>
> Since I didn't have many controls on the form, this is actually how I handled it.
>
>>
>>Another thing you could do is use the method Kevin McNiesh wrote about in his January FA article. Basically the same as above, but instead of the code being in the init of the form, you put it in the 'event' of the controls and 'raise' the event in the init() of your form.
>>
>
> I guess I'll have to pickup a copy of it. I'm not sure I see the difference between that and a method call except for symantics.
>
>Thanks for the feedback.
Looser coupling between the form and the objects.. what if you move on of the controls on to a page frame, you would have to modify the code in init that references it.
By raising an event in the forms init you don't know what controls will respond to it, or even need to know where they are placed in the forms containership hierarchy.
Also, you could reuse these controls on other forms that have an object reference to this object... if you have such a thing.
BOb
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only