Share via


FocusRect Property (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.

Returns or sets a value that determines whether the ModHFGrid should draw a focus rectangle around the current cell.

Syntax

object.FocusRect [= value]

The FocusRect property syntax has these parts:

Part Description
object An object expression that evaluates to the ModHFGrid Control object.
value An integer or constant that specifies the focus rectangle style, as described in Settings.

Settings

The settings for value are:

Constant Value Description
flexFocusNone 0 There is no focus rectangle around the current cell.
flexFocusLight 1 There is a light focus rectangle around the current cell. This is the default.
flexFocusHeavy 2 There is a heavy focus rectangle around the current cell.

Remarks

If a focus rectangle is drawn, the current cell is painted in the background color, as in most spreadsheets and grids. Otherwise, the current cell is painted in the selection color. Therefore, you can see which cell is selected without the focus rectangle.

Example

The following code sets the focus rectangle for the active cell to a light rectangle using the constant value.

Sub Form1_Load () 
   ModHFGrid1.FocusRect = flexFocusLight
End Sub

See Also

ModHFGrid Control