Flags Property

Gets or sets flags that affect the behavior of the control.

Syntax

[form!]VSFlexGrid.Flags[ = ControlFlagsSettings ]

Remarks

The settings for the Flags property are described below:

 

Constant

Value

Description

flexCFNone

0

No flags

flexCFV7SelectionEvents

1

Selection events (BeforeSelChange, AfterSelChange) are fired only when the Row/Col parameters refer to valid coordinates.

flexCFAutoClipboard

2

Causes the control to handle clipboard keys automatically

Copy:  CTRL+C, CTRL+INSERT

Cut:  CTRL+X, SHIFT+DELETE (if editable)

Paste:  CTRL+V, SHIFT+INSERT (if editable)

Delete:  DELETE (if editable)

flexCFNoEditIndent

4

Causes the edit control to use the old behavior: align to the left, no indent.

flexCFBindToBinaryFields

8

Causes the grid to show binary fields when it is bound to a data source.

 

By default, VSFlexGrid fires selection change events whenever the selection changes, even when the cell coordinates are invalid (for example, the selection was removed by setting Row = -1, or the old row was removed with Rows = 1).

If you set fg.Flags = flexCFV7SelectionEvents, then the control will fire selection events (BeforeSelChange, AfterSelChange) only when the Row/Col parameters refer to valid coordinates. (This is the same behavior as in VSFlexGrid version 7.)

See Also

VSFlexGrid Control