You can use the following to configure editors:
The following edit-related events are triggered in this sequence:
A cell or a column supports the following editor types:


| Name | Value | Description | |||
| ReadOnly | 0 | The column or the cell has no editor associated. | |||
| EditType | 1 |
Adds a standard text edit field.
The EditType editor provides the following configurable options:
| |||
| DropDownType | 2 |
The following sample adds a column with a DropDownType editor: With .Columns.Add("Editor").Editor
.EditType = DropDownType
.AddItem 0, "Single Bed", 1
.AddItem 1, "Double Bed", 2
.AddItem 2, "Apartment", 3
.AddItem 3, "Suite", 4
.AddItem 4, "Royal Suite", 5
End With
.Items.CellValue(.Items(0), "Editor") = "Apartment"
The DropDownType editor provides the following configurable options:
| |||
| DropDownListType | 3 |
The editor provides an intuitive interface that allows users to select values from predefined lists displayed in a drop-down window. The DropDownListType editor does not include a standard text edit field. Use the AddItem or InsertItem methods to add predefined values to the drop-down list.
The DropDownRows property defines the maximum number of visible rows in the drop-down list. The editor displays the caption of the item that corresponds to the CellValue value. If available, the item's icon is displayed as well.
The following sample adds a column with a DropDownListType editor: With .Columns.Add("Editor").Editor
.DropDownAutoWidth = False
.EditType = DropDownListType
.AddItem 0, "Single Bed", 1
.AddItem 1, "Double Bed", 2
.AddItem 2, "Apartments", 3
.InsertItem 3, "1 Bed Apartment", 4, 2
.InsertItem 4, "2 Bed Apartment", 5, 2
.AddItem 5, "Suite", 4
.InsertItem 6, "Royal Suite", 1, 5
.InsertItem 7, "Deluxe Suite", 2, 5
.ExpandAll
End With
.Items.CellValue(.Items(0), "Editor") = 3
The DropDownListType editor provides the following configurable options:
| |||
| SpinType | 4 |
The SpinType editor allows users to view and modify numeric values using a familiar up/down button (spin control) interface. The AddItem or InsertItem methods have no effect when the EditType is set to
SpinType. The Numeric property specifies whether the edit control accepts numeric values only.
The SpinType editor provides the following configurable options:
| |||
| MemoType | 5 |
The MemoType editor is designed to provide a unique and intuitive interface that can be integrated into your application to help users work with textual information. When the content does not fit within the edit box, the editor window automatically expands. The AddItem or InsertItem methods have no effect when the EditType is set to MemoType.
The MemoType editor provides the following configurable options:
| |||
| CheckListType | 6 |
The editor provides an intuitive interface that allows users to check values from predefined lists displayed in a drop-down window. Each item in the list has an associated check box. The editor displays a comma-separated list of item captions, representing an OR combination of the CellValue value. Use the AddItem or InsertItem methods to add new predefined values to the drop-down list. The DropDownRows property defines the maximum number of visible rows in the drop-down list. Use the CheckImage property to customize the appearance of the check boxes.
The following sample adds a column with a CheckListType editor: With .Columns.Add("Editor").Editor
.EditType = CheckListType
.AddItem 1, "Single Bed", 1
.AddItem 2, "Double Bed", 2
.AddItem 4, "Apartment", 3
.AddItem 8, "Suite", 4
.AddItem 16, "Royal Suite", 5
End With
.Items.CellValue(.Items(0), "Editor") = 5
The editor supports the following options:
| |||
| DateType | 7 |
The DateType editor is a date/calendar control (not the Microsoft Calendar Control). The drop-down calendar offers an efficient and visually appealing way to edit dates at runtime. The DateType editor includes a standard edit control. Users can easily select a date either by choosing it from the drop-down calendar or by typing the date directly. The editor displays the CellValue value as a date. To customize how the date is displayed, use the FormatColumn event. The AddItem or InsertItem methods have no effect when the EditType is set to DateType.
The DateType editor allows the following configurable options:
The following sample adds a column with a DateType editor: With .Columns.Add("Editor").Editor
.EditType = DateType
End With
.Items.CellValue(.Items(0), "Editor") = Date
| |||
| MaskType | 8 |
The MaskType editor allows users to enter data that includes literals and requires a mask to filter characters during input. This control can be used to enforce the entry of many types of formatted information, such as telephone numbers, social security numbers, IP addresses, and license keys. The Mask property defines the editor’s input mask, while the MaskChar property specifies the character used for masking. The Mask property supports one or more literals: #, x, X, A, ?, <, >, *, \, {nMin,nMax}, […]. The AddItem or InsertItem methods have no effect when the EditType is set to MaskType.
The MaskType editor provides the following configurable options:
The following sample shows how to mask a column for input phone numbers: With .Columns.Add("Editor").Editor
.EditType = MaskType
.Mask = "(###) ### - ####"
End With
.Items.CellValue(.Items(0), "Editor") = "(214) 345 - 789"
| |||
| ColorType | 9 |
You can include a color selection control in your applications by using the ColorType editor. The editor includes a standard edit control along with a color drop-down window. The color drop-down window contains two tabs for selecting colors: the “Palette” tab displays a grid of colors, while the “System” tab shows the current Windows color constants. The AddItem or InsertItem methods have no effect when the EditType is set to ColorType.
The ColorType editor allows the following configurable options:
The following sample adds a column with a ColorType editor: With .Columns.Add("Editor").Editor
.EditType = ColorType
End With
.Items.CellValue(.Items(0), "Editor") = vbRed
See also the ColorListType editor
| |||
| FontType | 10 |
The FontType editor provides an intuitive way to select fonts. It includes a standard edit control and a font drop-down window. The font drop-down window displays a list of all system fonts. The AddItem or InsertItem methods have no effect when the EditType is set to FontType. The DropDownRows property defines the maximum number of visible rows in the drop-down list.
The FontType editor allows the following configurable options:
The following sample adds a column with a FontType editor: With .Columns.Add("Editor").Editor
.EditType = FontType
End With
.Items.CellValue(.Items(0), "Editor") = "Times New Roman"
| |||
| PictureType | 11 |
The PictureType editor allows the following configurable options:
The following sample shows how you can use the PictureType editor with a picture being loaded using the LoadPicture API: With .Columns.Add("Editor").Editor
.EditType = PictureType
End With
.Items.CellValue(.Items(0), "OLEObject") = .ExecuteTemplate("LoadPicture(`" + App.Path + "\human.png" & "`)")
The AddItem or InsertItem method has no effect, if the EditType is PictureType. | |||
| ButtonType | 12 |
The ButtonType editor consists of a standard edit field and a "..." button. The ButtonClick event is triggered when the user clicks the button. The ButtonType editor includes all configurable options of EditType and additionally provides a button for user interaction.
The AddItem or InsertItem methods have no effect when the EditType is set to ButtonType. You can also add multiple buttons of any type using the AddButton method.
| |||
| ProgressBarType | 13 |
The ProgressBarType editor displays a visual progress indicator based on a percentage value. Use the CellValue property to specify the percentage to be shown in the progress bar. The value of CellValue should be between 0 and 100, where 0 represents an empty progress bar and 100 represents a fully filled bar. This allows you to visually represent progress, completion status, or any other percentage-based metric in your application.
The ProgressBarType editor allows the following configurable options:
| |||
| PickEditType | 14 |
The PickEditType editor provides an intuitive interface for users to select values from predefined lists displayed in a drop-down window. It includes a standard edit field that allows users to search for items by typing. The DropDownRows property defines the maximum number of visible rows in the drop-down list. Use the AddItem or InsertItem methods to add new predefined values to the list. The editor displays the caption of the item that matches the CellValue property. If the item has an associated icon, it is also displayed alongside the caption.
The PickEditType editor provides the following configurable options:
The following sample shows how to add values to a drop down list: With .Columns.Add("Editor").Editor
.EditType = PickEditType
.AddItem 0, "Single Bed", 1
.AddItem 1, "Double Bed", 2
.AddItem 2, "Apartment", 3
.AddItem 3, "Suite", 4
.AddItem 4, "Royal Suite", 5
End With
.Items.CellValue(.Items(0), "Editor") = "Apartment"
| |||
| LinkEditType | 15 |
The LinkEditType editor allows your application to display and edit hyperlink addresses, providing an intuitive way for users to enter or modify URLs directly within the control.
The LinkEditType editor includes all configurable options of EditType, except that clicking the editor opens the hyperlink instead of just editing it.
| |||
| UserEditorType | 16 |
The control can use ActiveX controls as a built-in editor. The UserEditor property is used to define the custom user control. If successful, the UserEditorObject property retrieves the newly created object.
When using custom editors, the following events are triggered:
The following sample shows how you can setup an user editor, using ExComboBox control: Set rs = CreateObject("ADOR.Recordset")
With .Columns.Add("Editor").Editor
.EditType = UserEditorType
.UserEditor "Exontrol.ComboBox", ""
With .UserEditorObject
.BeginUpdate
.Style = 2
.ColumnAutoResize = False
.UseTabKey = False
.IntegralHeight = True
.MinHeightList = 128
rs.Open "Orders", "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb", 3, 3
.DataSource = rs
.EndUpdate
End With
End With
.Items.CellValue(.Items(0), "Editor") = 12
The setup includes VB\UserEdit(1,2,3) and VC\User.Edit sample projects that demonstrate using ExComboBox component as a custom editor within the ExG2antt component (a multi-column combo box control). | |||
| ColorListType | 17 |
![]()
You can also include a color selection control in your application by using the ColorListType editor. This editor hosts a predefined list of colors. By default, the following colors are included: Black, White, Dark Red, Dark Green, Dark Yellow, Dark Blue, Dark Magenta, Dark Cyan, Light Grey, Dark Grey, Red, Green, Yellow, Blue, Magenta, and Cyan. The AddItem method allows you to add additional colors to the color list.
The ColorListType editor provides the following configurable options:
The following sample adds few custom colors to the ColorListType editor: With .Columns.Add("Editor").Editor
.EditType = ColorListType
.AddItem 128, "Dark Red"
.AddItem RGB(0, 128, 0), "Dark Green"
.AddItem RGB(0, 0, 128), "Dark Blue"
End With
.Items.CellValue(.Items(0), "Editor") = 128
| |||
| MemoDropDownType | 18 |
It provides a multi-line edit control that is displayed within a drop-down window.
The MemoDropDownType editor provides the following configurable options:
Use the Items.CellSingleLine property to specify whether the cell displays multiple lines. The AddItem or InsertItem methods have no effect when the EditType is set to MemoDropDownType. | |||
| CheckValueType | 19 |
Displays check boxes within columns or individual cells. The CellValue property indicates the current state of the cell’s check box. See also the CellHasCheckBox property.
The CheckValueType editor supports the following options:
For example, if your cells contain Boolean values (True is -1, False is 0), the control displays the partial-check icon for True values by default. You can override this behavior by executing the following code before assigning the CheckValueType editor: G2antt1.DefaultEditorOption(exCheckValue2) = 1 This replaces the partial-check appearance with the checked-state appearance. | |||
| SliderType | 20 |
| |||
| CalculatorType | 21 |
Adds a drop-down calculator to a node.
The CalculatorType editor provides the following configurable options:
|
All caret-based editors support the following configurable options: