ListBox.CellType
Warning
This item was deprecated in version 2019r2. Please use DesktopListBox.CellTypeAt as a replacement.
Description
Sets the type of the passed cell. Row and Column are zero-based.
Notes
Use the following class constants to set the CellType:
Class Constant |
Value |
Description |
---|---|---|
TypeDefault |
0 |
Default column type. |
TypeNormal |
1 |
Normal column. |
TypeCheckBox |
2 |
Checkbox column. |
TypeEditable |
3 |
Inline editable column using a TextField. Use TypeEditableTextField or TypeEditableTextArea instead. |
TypeEditableTextField |
3 |
Inline editable column using a TextField. |
TypeEditableTextArea |
4 |
Inline editable column using a TextArea. |
It is best programming practices to use the Class Constants to set the CellType and not the Integer value. See example below for using the Class Constant that are found in the list.
CellType values that are not TypeDefault (0) override ColumnTypeAt. For example, if ColumnTypeAt is TypeCheckBox, but a cell in the column has CellType set to TypeNormal, the cell will be normal.
Sample code
This code shows a checkbox in a single cell:
ListBox1.CellType(0, 4) = Listbox.TypeCheckbox ' Cell in the 1st row, 5th column now shows a checkbox
To set or use the value of the Cell's checkbox see both the CellCheckBoxValueAt property (boolean) and CellCheckBoxState method (CheckedUncheckedIndeterminate). This code uses CellCheckBoxState to set the cell to be checked:
ListBox1.CellCheckBoxState(0, 4) = CheckBox.CheckedStates.Checked
Compatibility
All projects types on all supported operating systems.