ListBox.CellState

From Real Software Documentation

Jump to: navigation, search
Method
ListBox.CellState ( Row as Integer,Column as Integer ) As CheckedStates

Used to get or set the state of the cell with the coordinates of Row, Column. Row and Column are zero-based. This assumes that the passed cell is a CheckBox cell. Use the CellType property to set a cell to a CheckBox cell.

CheckedStates Enumeration is an Enum of the CheckBox class.

Example

The CellState method enables you to get or set the value of a tri-state Checkbox cell. Any cell of type TypeCheckbox box can store one of three values: Checked, Unchecked, and Indeterminate.

To set up a cell as TypeCheckbox, use code such as this in the Open event:

Me.CellType(1,0)=ListBox.TypeCheckBox

To change the state of the cell, use the CheckedStates enum of the CheckBox control:

ListBox1.CellState(1,0)=Checkbox.CheckedStates.Indeterminate

The Indeterminate state places a minus sign in the checkbox (Macintosh) or fills in checkbox (Windows and Linux).

Personal tools