we have a userdefined control (called e.g. LabelAndMore) which contains a Label and other controls. When I apply this userdef. ctrl LabelAndMore in eg. a form I need to set the properties of the label.
Of course, we could add properties like Label_Text and Label_AutoSize in LabelAndMore. For a label this would be ok. However, if a more complex control with more relevant properties is needed instead of a label, all its properties would have to be added in LabelAndMore just to mirror the already existing properties of the complex control to LabelAndMore.
Thus we had the idea to add the property
Public Property Label() As Label
Set(ByVal value As Label)
Me.Label1 = value
in LabelAndMore. At the first glance this approach looks quite fine. When I add a LabelAndMore to e.g. a form and look at the property list of the inserted instance of LabelAndMore, the new property Label shows. It has a plus symbol in front of it. Expanding it one gets all the properties of the label. But unfortunately the designer does not create code in Form1.Designer.vb for the changed properties of the Label within LabelAndMore.
What do we have to do so that changes of the properties of Label in LabelAndMore are added to the code created by the designer?
I guess it is possible because a split container does it. It consists two panels called Panel1 and Panel2 and the changes of their properties are added in the code created by the designer.
Me.SplitContainer1.Panel2.Enabled = False
Kind regards and thanks in advance.
(VB .net 3.5)