Skip to content

InsertChildItemBinded Method

Description

The InsertChildItemBinded method is used to insert a new PropertyGridItem at a specific position within a collection of items. This means that the PropertyGridItem is bound to a variable, and the value of the item is stored in this variable.

Syntax

Public Function InsertChildItemBinded( _
    ByVal [Index](#) As Integer, _
    ByVal [Type](#) As [PropertyItemType](XtremePropertyGrid~Enumerations~PropertyItemType_EN.md), _
    ByVal [Handler](#) As Object, _
    ByVal [Property](#) As String _
) As [PropertyGridItem](XtremePropertyGrid~PropertyGridItem.md)

Parameters

  • Index
    The position in the collection of items to insert the new item.

  • Type
    The type of the PropertyGridItem. Possible types include:

  • PropertyItemString: PropertyGridItem of type String.
  • PropertyItemNumber: PropertyGridItem of type Number.
  • PropertyItemBool: PropertyGridItem of type Boolean.
  • PropertyItemColor: PropertyGridItem of type Color.
  • PropertyItemFont: PropertyGridItem of type Font.
  • 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.

  • Handler
    The object that "handles" the variable the item is binding to. That is, the object the variable is defined in.

  • Property
    The name of the variable that will be bound to the PropertyGridItem in string notation (explained below).

Remarks

Bound variables store the values of the property grid items and can be accessed without using the property grid methods and properties. Bound variables allow the property grid to store data in variables. Binding works in only one direction. When the value of a PropertyGridItem is changed, the value of the bound variable will be changed to the PropertyGridItem value. If the value of the variable is changed without using the PropertyGrid, the PropertyGridItem value will not change (you would need to explicitly update the PropertyGridItem value with the contents of the variable).

The advantage of binding is that the variable can be used and manipulated without using PropertyGridItem methods and properties.

Important Note: When the binding occurs, the variable name is passed to the method in String Notation. String Notation means the name of the variable is placed in quotation marks; within the quotation marks, the variable name can be passed with any combination of spaces and uppercase/lowercase letters, but no extra characters can be added, and they must appear in the same order. For example, when binding to the variable AssembleName, you could pass the variable as Sassemblename, which is the same as SASSEMBLE n a m e, but SAssemble Names will not work because an extra S is added. The reason for this is the variable name passed in String Notation will be used as the PropertyGridItem Caption if no caption is explicitly set.

Note: A variable must be declared within an object's code if it will be bound. This means bound variables cannot be declared in a .bas module.

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.