Share via


ColSel, RowSel Properties (ModHFGrid)

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

ColSel returns or sets the start or end column for a range of cells.

RowSel returns or sets the start or end row for a range of cells.

These properties are not available at design time.

Syntax

object.ColSel [= value]
object.RowSel [= value]

Syntax for the ColSel and RowSel properties has these parts:

Part Description
object An object expression that evaluates to the ModHFGrid Control object.
value A Long value that specifies the start or end row or column for a range of cells.

Remarks

You can use these properties to select a specific region of the ModHFGrid programmatically or to read the dimensions of an area that the user selects into code.

The ModHFGrid cursor is in the cell at Row, Col. The ModHFGrid selection is the region between rows Row and RowSel and columns Col and ColSel. Note that RowSel might be above or below Row, and ColSel might be to the left or to the right of Col.

Whenever you set the Row and Col properties, RowSel and ColSel are reset automatically, 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.

Example

The following code returns the value of the ColSel property into the first cell of ModHFGrid1. This value changes as the user clicks various selections of cell groups.

Private Sub ModHFGrid1_MouseUp _
(Button As Integer, Shift As Integer, x As Single, _
      y As Single)
   ModHFGrid1.Text = ModHFGrid1.ColSel
End Sub

See Also

Col, Row Properties (ModHFGrid) | SelChange Event (ModHFGrid) | Sort Property (ModHFGrid) | ModHFGrid Control