method Items.SetParent (Item as HITEM, NewParent as HITEM)

Changes the parent of the given item.

 TypeDescription 
   Item as HITEM A long expression that indicates the handle of the item being moved.  
   NewParent as HITEM A long expression that indicates the handle of the new parent item.  

Use the SetParent property to change the parent item at runtime. Use the InsertItem property to insert child items. Use the InsertControlItem property to insert ActiveX controls. 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: G2antt1.Items.SetParent G2antt1.Items(0), G2antt1.Items(1). Use the ItemParent property to retrieve the parent of the item.


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.