Type | Description | |||
Value as Long | A long expression that defines an unique predefined value | |||
Caption as String |
A string expression that specifies the HTML
caption associated with the value. The format of the Caption parameter is "key|caption¦caption¦...¦caption", which indicates an item with the giving key / identifier, which displays multiple captions.
The Caption allows using the following special characters:
For instance:
| |||
Image as Variant | A long expression that indicates the index of the item's icon (1-based). Use the Images method to assign a list of icons to the control. |
Use the AddItem method to add new items to the editor's predefined list. Use the InsertItem method to insert child items to the editor's predefined list. If the AddItem method uses a Value already defined, the old item is replaced. The AddItem method has effect for the following type of editors: DropDownType, DropDownListType, PickEditType, and CheckListType. Check each EditType value for what Value argument should contain. Use the RemoveItem method to remove a particular item from the predefined list. Use the ClearItems method to clear the entire list of predefined values. Use the SortItems to sort the items. Use the ItemToolTip property to assign a tooltip to a predefined item into a drop down list. Use the Refresh method update immediately the cell's content when adding new items to a drop down list editor. The Caption parameter supports HTML tags listed here here.
The following VB sample adds items to a CheckListType editor:
With G2antt1 With .Columns.Add("CheckList").Editor .EditType = CheckListType .AddItem &H1, "ReadOnly", 1 .AddItem &H2, "Hidden", 2 .AddItem &H4, "System", 3 .AddItem &H10, "Directory", 4 .AddItem &H20, "Archive", 5 .AddItem &H80, "Normal", 7 .AddItem &H100, "Temporary", 8 End With .Items.AddItem &H1 + &H2 End With
The following VB sample adds predefined values to drop down list editor:
With G2antt1.Items With .CellEditor(.FirstVisibleItem, 0) .EditType = DropDownListType .AddItem 0, "No border", 1 .AddItem 1, "Single Border", 2 .AddItem 2, "Double Border", 3 End With End With
The following C++ sample adds predefined values to drop down list editor:
With G2antt1.Items With .CellEditor(.FirstVisibleItem, 0) .EditType = DropDownListType .AddItem 0, "No border", 1 .AddItem 1, "Single Border", 2 .AddItem 2, "Double Border", 3 End With End With
The following VB.NET sample adds predefined values to drop down list editor:
With AxG2antt1.Items With .CellEditor(.FirstVisibleItem, 0) .EditType = EXG2ANTTLib.EditTypeEnum.DropDownListType .AddItem(0, "No border", 1) .AddItem(1, "Single Border", 2) .AddItem(2, "Double Border", 3) End With End With
The following C# sample adds predefined values to drop down list editor:
EXG2ANTTLib.Items items = axG2antt1.Items; EXG2ANTTLib.Editor editor = items.get_CellEditor(items.FirstVisibleItem, 0); editor.EditType = EXG2ANTTLib.EditTypeEnum.DropDownListType ; editor.AddItem(0, "No border", 1); editor.AddItem(1, "Single border", 2); editor.AddItem(2, "Double border", 3);
The following VFP sample adds predefined values to drop down list editor:
with thisform.G2antt1.Items With .CellEditor(.FirstVisibleItem, 0) .EditType = 3 && DropDownList .AddItem(0, "No border", 1) .AddItem(1, "Single Border", 2) .AddItem(2, "Double Border", 3) EndWith endwith