ColSelproperty
Returns or sets the start or end column for a range of cells.
Syntax
PROPERTY ColSel () AS LONG
PROPERTY ColSel (BYVAL nCol AS LONG)
Parameters
| Name | Description | |
|---|---|---|
nCol | A Long value that specifies the start or end column for a range of cells. |
Description
Returns or sets the start or end column for a range of cells.
Remarks
ColSel works in conjunction with the Col property to define a horizontal selection block. The selection spans from the column index specified by Col to the column index specified by ColSel.
Whenever you set the Row and Col properties, RowSel and ColSel are automatically reset, so the cursor becomes the current selection. To select a block of cells from code, you must first set the Row and Col properties, and then set RowSel and ColSel. Note that RowSel may be above or below Row, and ColSel may be to the left or to the right of Col.
Example
' Move the active focus to the start of the range grid.Col = 1
' Extend the selection highlight to the end of the range grid.ColSel = 3
Reference
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid