[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Grids' (#lcl)

# TCustomGrid.Options2

Contains additional options for scrolling and editor behavior enabled in the grid control.

## Declaration

Source position: grids.pas line 1282

`protected property TCustomGrid.Options2 : TGridOptions2 read FOptions2 write SetOptions2 default DefaultGridOptions2;`

## Description

Options2 is a TGridOptions2 property which contains options which control scrolling or cell editors in the grid control. It is a set type which contains zero (0) or more values from the TGridOption2 enumeration.

See TGridOption2 for the values allowed in the set type. The default value for the property is defined in the DefaultGridOptions2 constant (it is an empty set).

The set values can be included or excluded at design-time using the object inspector in the Lazarus IDE. They can also be included or excluded in the set at run-time using program code.

Values present in the set cause the corresponding behaviors to be enabled in the control at run-time. For example:

goScrollToLastCol
  Allows columns to be scrolled until the last column is the LeftCol for the grid control.
goScrollToLastRow
  Allows rows to be scrolled until the last row is the TopRow for the grid control.
goEditorParentColor
  Sets the color in a cell editor to the color in the parent control (the TCustomGrid instance). Changing the set member does not affect an existing cell editor already visible on the control. The change is applied when the next cell editor is created and displayed.
goEditorParentFont
  Sets the font in a cell editor to the font in the parent control (the TCustomGrid instance). Changing the set member does not affect an existing cell editor already visible on the control. The change is applied when the next cell editor is created, configured, and/or displayed.

Use Options to control the primary features and behaviors in the grid control.

Use MouseWheelOption to control the mouse wheel behavior in the control.

## Version info

Modified in version 3.0 to include goEditorParentColor and goEditorParentFont options.

## See also

TCustomGrid.Options |  | Contains the set of optional features and/or behaviors enabled for the grid control.
TCustomGrid.MouseWheelOption |  | Sets the mouse wheel behavior for the grid control.
TCustomGrid.CalcMaxTopLeft |  | Updates cached grid information for the visible area and scroll bars in the control.
TCustomGrid.GetSBRanges |  | Gets the range values for the scroll bars when visible.
TCustomGrid.GetSBVisibility |  | Gets the values for the scroll bar visibility flags in the control.
TCustomGrid.SaveGridOptions |  | Saves grid options to the specified XML configuration file.
TCustomGrid.LoadGridOptions |  | Loads design-time values for the Options in a grid from an XML configuration file.
TCustomGrid.DoEditorShow |  | Performs actions needed to show the cell Editor for the grid control.
TGridOptions2 |  | Set type used to store enabled grid options from the TGridOption2 enumeration.
TGridOption2 |  | Represents grid options introduced in Version 2 (or higher) of grid controls.
DefaultGridOptions2 |  | Default grid options enabled for version 2 of the grid control.