I have a custom component, that contains a list of another components.
If I add a child component to the list, it shows up on the same level as the parent component in the document outline window.
How can I make it a subitem of the parent component? (similarly to e.g. TabPages that are subitems of a TabControl)
Here is my code:
Public Class SomeComponent
Inherits Component
Public Sub New(ByVal cont As IContainer)
cont.Add(Me)
End Sub
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
<Editor("System.ComponentModel.Design.CollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", GetType(UITypeEditor))> _
Public ReadOnly Property Items() As List(Of SomeOtherComponent)
Get
If _items Is Nothing Then
_items = New List(Of SomeOtherComponent)
End If
Return _items
End Get
End Property
Private _items As List(Of SomeOtherComponent) = Nothing
End Class
Public Class clsAction
Inherits SomeOtherComponent
Public Sub New()
End Sub
Public Sub New(ByVal cont As IContainer)
cont.Add(Me)
End Sub
'...
End Class