initialize panel
-
Hello, I have to do the follwing steps: 1) add controls to a panel programatically 2) make initialization steps in the added control (e.g. add labels) depending on the size it could be also that the added controls contains other subcontrols for which this steps are also needed... Normally I think the best way to do that is the Load event, isn't it? But in panel it isn't availaible. What is the best way to solve that? Regards Hansjörg
-
Hello, I have to do the follwing steps: 1) add controls to a panel programatically 2) make initialization steps in the added control (e.g. add labels) depending on the size it could be also that the added controls contains other subcontrols for which this steps are also needed... Normally I think the best way to do that is the Load event, isn't it? But in panel it isn't availaible. What is the best way to solve that? Regards Hansjörg
-
I don't like this solution very much, because a few properties are set after the instantiation. This properties affect the behaviour of the panel. Regards Hansjörg
-
I don't like this solution very much, because a few properties are set after the instantiation. This properties affect the behaviour of the panel. Regards Hansjörg
-
Maybe hook on to Panel.ControlAdded . The problem is that this one gets fired after the addition of every one of your controls.
It seems that this is the only solution but it is more work to coding... Regards and thanks Hansjörg