InsertChildItem Method
Description
The InsertChildItem method is used to insert a new PropertyGridItem at a specific position within a collection of items.
Syntax
Public Function InsertChildItem( _
ByVal [Index](#) As Integer, _
ByVal [Type](#) As [PropertyItemType](XtremePropertyGrid~Enumerations~PropertyItemType_EN.md), _
ByVal [Title](#) As String, _
ByVal [Value](#) As Variant _
) As [PropertyGridItem](XtremePropertyGrid~PropertyGridItem.md)
Parameters
-
Index
The position in the collection of items to insert the new item. -
Type
Type of item to insert. Possible values include: - PropertyItemString: PropertyGridItem of type String.
- PropertyItemNumber: PropertyGridItem of type Number.
- PropertyItemBool: PropertyGridItem of type Boolean.
- PropertyItemColor: PropertyGridItem of type Color.
- PropertyItemFont: PropertyGridItem.
- PropertyItemDouble: PropertyGridItem of type Double.
- PropertyItemDate: PropertyGridItem of type Date.
- PropertyItemPicture: PropertyGridItem of type Picture.
- PropertyItemEnum: PropertyGridItem of type Enum.
- PropertyItemEnumFlags: PropertyGridItem of type EnumFlags. This will create a Flags value item in the Property Grid control.
- PropertyItemCategory: PropertyGridItem is a Category.
- PropertyItemMultilineString: PropertyGridItem that contains a multi-line string. When using this property, a dropdown button will appear next to the item text that, when clicked, will display an edit window with the entire line of text.
-
PropertyItemOption: PropertyGridItem of type PropertyGridItemOption.
-
Title
The caption/title to give the item. -
Value
The value to assign to the item.
Return Type
Pointer to the item at the specified index that was inserted into the collection of items.
Remarks
The InsertChildItem method creates a new PropertyGridItem and inserts it at the specified Index in the collection of items. Items can be added to the Categories collection of items or to Child Items collection of items as shown below. Items added to the Categories collection will be used as categories. Items added to a category's collection of child items will be displayed in the category that they are added to.

See Also
Example
Adding Items to the Property Grid
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.