NM
Found the solution thanks to this article:
http://www.divil.co.uk/net/articles/designers/collectioncontrols.asp
It was still hard work trying to do something that i don't understand.
Creating designers is a pain in the *** :p
Anyways the solution looks something like this:
Dim c As IComponentChangeService = DirectCast _
(GetService(GetType(IComponentChangeService)), IComponentChangeService)
Dim h As IDesignerHost = DirectCast(GetService(GetType(IDesignerHost)), IDesignerHost)
'If the user is removing one of the Groups
If TypeOf e.Component Is CheckListBoxGroup Then
Dim Group As CheckListBoxGroup = DirectCast(e.Component, CheckListBoxGroup)
For i As Integer = Group.CheckBoxes.Count - 1 To 0 Step -1
Dim chkbox As OmniCheckBox = Group.CheckBoxes(i)
c.OnComponentChanging(chkbox, Nothing)
MyControl.Controls.Remove(chkbox)
h.DestroyComponent(chkbox)
c.OnComponentChanged(chkbox, Nothing, Nothing, Nothing)
Next
End If
'If the user is removing this control then remove all groups
If e.Component Is MyControl Then
Dim MyCheckListBox As OmniCheckedListBox = DirectCast(e.Component, OmniCheckedListBox)
For i As Integer = MyCheckListBox.Items.Count - 1 To 0 Step -1
Dim Group As CheckListBoxGroup = MyCheckListBox.Items(i)
c.OnComponentChanging(Group, Nothing)
MyControl.Items.Remove(Group)
h.DestroyComponent(Group)
c.OnComponentChanged(Group, Nothing, Nothing, Nothing)
Next
End If