TCustomDBGrid.Create constructor
Constructor for the class instance.
Declaration
constructor Create(AOwner: TComponent); overrideArguments
AOwner | Owner of the component. |
Description
Create is the constructor for the
TCustomDBGrid
instance. Create calls the inherited
Create method, and allocates
resources for properties in the class instance. Create sets the default event
handlers used in DataLink to the corresponding procedures in the class:
- OnDataSetChanged
- OnDataSetClose
- OnDataSetOpen
- OnDataSetScrolled
- OnEditingChanged
- OnFocusControl
- OnInvalidDataset
- OnInvalidDataSource
- OnLayoutChanged
- OnRecordChanged
- OnUpdateData
Create calls RenewColWidths to set columns to their default widths and to disable column auto-sizing.
Create sets the values in the Options property to establish the baseline features and behavior enabled for the grid control, including:
- dgColumnResize
- dgColumnMove
- dgTitles
- dgIndicator
- dgRowLines
- dgColLines
- dgConfirmDelete
- dgCancelOnExit
- dgTabs
- dgEditing
- dgAlwaysShowSelection
See the Options property and TDBGridOption type for more information on values in the enumeration.
Values in the Options property from the ancestor class are also updated. They use the set of enumeration values in TGridOption, and are updated to include values which correspond to the TDBGridOption values used in the database grid control.
Create sets the default values in the ExtraOptions property to the following:
- dgeAutoColumns
- dgeCheckboxColumn
The value of the AutoAdvance property is set to aaRightDown, indicating the cell navigation is from left-to-right and then top-to-bottom in the grid control.
Create sets the value in ScrollBars to ssBoth indicating that both horizontal and vertical scroll bars are needed, and sets AllowOutboundEvents to False to prevent forwarding of event notifications to the ancestor class.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
