method Items.SetParent (Item as HITEM, NewParent as HITEM)
Changes the parent of the given item.
Type
Description
Item as HITEM
A long expression that indicates the item's handle.
NewParent as HITEM
A long expression that indicates the handle of
the newly parent item.
Use the SetParent property to change the parent item at runtime. Use the InsertItem
property to insert child items. Use AcceptSetParent
property to verify if the the parent of an item can be changed. The following VB
sample changes the parent item of the first item: ComboBox1.Items.SetParent
ComboBox1.Items(0), ComboBox1.Items(1). Use the ItemParent
property to retrieve the parent of the item.