Sign in Join
FPDoc Onlineexperiment

Grids unit

Classes for displaying tabular data as a series of rows and columns.

grids.pas contains classes, types, constants, variables, and routines used to implement grid controls for the Lazarus Component Library ( LCL). Classes include:

  • TVirtualGrid
  • TCustomGrid
  • TDrawGrid
  • TStringGrid

Original author: Jesus Reyes Aguilar (jesusrmx@yahoo.com.mx) [2002]

Classes and records

EGridExceptionclassException raised when an error has occurred in a Grid class.
TButtonCellEditorclassThe editor used for button-style cells in a grid.
TCellPropsrecordContains attributes, data, and text for grid cells.
TColRowPropsrecordContains the size and display attributes for a column or row in a grid.
TCompositeCellEditorclassImplements a composite cell editor with combines one or more of the predefined cell editors types.
TCustomDrawGridclassThe base class for a custom-drawn grid control.
TCustomGridclassImplements the base class for grid controls.
TCustomStringGridclassThe base class for TStringGrid.
TDrawGridclassImplements a custom-drawn grid control.
TEditorItemrecordRepresents one of the editors used in a TCompositeCellEditor instance.
TGridColumnclassImplements a column definition used for tabular data in TCustomGrid.
TGridColumnsclassCollection used to store column definitions for a grid control.
TGridColumnTitleclassProvides properties and methods need to represent a column title in a grid.
TGridDataCacherecordStores cached information about a grid control.
TGridMessagerecordContains a LCL message and its auxiliary values.
TGridPropertyBackuprecordStores data about rows and columns used in a TCustomGrid class instance.
TGridScrollerclassScrolls an associated grid when a column or row is dragged beyond the client area for the control.
TPickListCellEditorclassImplements a cell editor control which displays a pick list.
TSizingRecrecordStores size and movement data for columns or rows in a grid.
TStringCellEditorclassImplements the default editor for cells in TCustomGrid.
TStringGridclassImplements a grid specialized for textual content.
TStringGridStringsclassRepresents strings used as the cell values in TCustomStringGrid / TStringGrid.
TVirtualGridclassImplements a grid with metadata where rows and columns are stored as Pointer arrays.

Procedures and functions

DrawRubberRectprocedureDraws a rubber banding rectangle.
FreeWorkingCanvasprocedureEnsures a canvas handle for a device context is freed.
GetWorkingCanvasfunctionEnsures that a valid handle for a device context exists for the canvas.
RegisterprocedureRegisters components in the Lazarus IDE.

Types

PCellPropstypePointer to a TCellProps type.
PColRowPropstypePointer to a TColRowProps type.
PGridMessagetypePointer to a TGridMessage type.
TAutoAdvanceenumerationEnumerated type with values controlling grid auto advance behavior.
TCellHintPriorityenumerationRepresents the cell hint display priorities.
TCellProcessEventprocedure typeSpecifies an event handler used to process the value in a grid cell.
TCellProcessTypeenumerationIdentifies the action performed for cell content.
TColumnButtonStyleenumerationEnumeration with cell editor types available in a grid control.
TGetCellHintEventprocedure typeEvent used to get cell hints.
TGetCheckboxStateEventprocedure typeSpecifies an event handler signalled to get the state for a check box cell in a grid.
TGetEditEventprocedure typeSpecifies an event handler used to get edit values or masks in a grid.
TGridCoordtypeStores mouse coordinates in screen pixels.
TGridCursorStateenumerationEnumerated type with cursor states available in a grid.
TGridDrawStatesetEnumeration with Grid draw state values.
TGridFlagssetSet type used to store TGridFlagsOption enumeration values.
TGridFlagsOptionenumerationRepresents state flags used in a grid control.
TGridOperationEventprocedure typeDefines the event handler signalled when rows or columns are added, deleted or moved in a grid.
TGridOptionenumerationRepresents grid option values available for grid controls.
TGridOption2enumerationRepresents grid options introduced in Version 2 (or higher) of grid controls.
TGridOptionssetSet type used to store enabled grid options.
TGridOptions2setSet type used to store enabled grid options from the TGridOption2 enumeration.
TGridRecttypeAlias for the TRect type in RTL.
TGridRectArraytypeArray type used to store TGridRect instances.
TGridSaveOptionsenumerationRepresents the save options available for LCL grid controls.
TGridScrollerDoScrollprocedure typeSpecifies an event handler routine used to scroll a grid control when a column or row is dragged beyond the grid client area.
TGridStateenumerationEnumerated type with grid state values.
TGridZoneenumerationEnumerated type with values which represent the zones or areas on a grid control.
TGridZoneSetsetSet type used to store TGridZone enumeration values.
THdrEventprocedure typeSpecifies an event handler signalled when an event occurs in a fixed header cell.
THeaderSizingEventprocedure typeSpecifies an event handler signalled when a fixed cell header in a grid is resized.
TItemTypeenumerationNot used in the current LCL implementation.
TMouseWheelOptionenumerationEnumerated type with values that control mouse wheel operation in a grid control.
TOnCompareCellsprocedure typeSpecifies an event handler signalled to compare cell values.
TOnDrawCellprocedure typeDefines the event handler signalled to draw a cell on a grid control.
TOnPrepareCanvasEventprocedure typeSpecifies an event handler signalled when preparing the canvas for a grid control.
TOnSelectCellEventprocedure typeSpecifies the event handler signalled when a cell is selected in a grid control.
TOnSelectEventprocedure typeSpecifies an event handler signalled for a selection in a grid control.
TPrefixOptionenumerationIndicates how accelerator keys in column titles are handled for a grid control.
TRangeSelectModeenumerationEnumerated type with the Range selection mode used in a grid control.
TSaveColumnEventprocedure typeSpecifies an event handler used to load/save the configuration for a grid column.
TSaveOptionssetSet type used to store TGridSaveOptions values.
TSelectEditorEventprocedure typeSpecifies an event handler signalled to get an editor control for the specified cell.
TSetCheckboxStateEventprocedure typeSpecifies an event handler signalled to set the state for a check box cell in a grid.
TSetEditEventprocedure typeSpecifies an event handler used to set the value for edit text in a grid.
TSortOrderenumerationEnumerated type with sort orders supported in a grid control.
TTitleStyleenumerationEnumeration with values that control the display style for fixed title cells.
TToggledCheckboxEventprocedure typeSpecifies an event handler signalled when the value in a check box cell is changed.
TUserCheckBoxBitmapEventprocedure typeSpecifies an event handler signalled to get the user-supplied bitmap for a check box cell.
TUserCheckBoxImageEventprocedure typeSpecifies the event handler used to get the image drawn for a check box column.
TValidateEntryEventprocedure typeSpecifies the event handler used to validate the content in a grid cell.

Constants

constCellPaddingconstantDefault padding for the content in grid cells.
constColRowBorderToleranceconstantMinimum proximity to row or column borders for resizing operations.
constRubberSpaceconstantDefault spacing around rubber band rectangles.
DefaultGridOptionsconstantSet with the default grid options enabled for instances of the grid control.
DefaultGridOptions2constantDefault grid options enabled for version 2 of the grid control.
DEFBUTTONWIDTHconstantDefault width for edit control buttons in a grid.
DEFCOLWIDTHconstantDefault width for columns in a grid control.
DEFIMAGEPADDINGconstantDefault padding used for title images displayed in a grid.
DEFMAXSIZEconstantDefault value used as the maximum grid column size.
DEFMINSIZEconstantDefault value used as the minimum grid column size.
DEFSIZEPRIORITYconstantDefault value for SizePriority property in a grid column.
EO_AUTOSIZEconstantRepresents the auto-size editor option in a grid message.
EO_HOOKKEYDOWNconstantRepresents the hook key down editor option in a grid message.
EO_HOOKKEYPRESSconstantRepresents the hook key press editor option in a grid message.
EO_HOOKKEYUPconstantRepresents the hook key up editor option in a grid message.
EO_IMPLEMENTEDconstantRepresents the implemented editor option in a grid message.
EO_SELECTALLconstantRepresents the select all content editor option in a grid message.
GM_GETGRIDconstantLazarus message used to get the grid for an editing control.
GM_GETVALUEconstantLazarus message for getting the value in a grid edit control.
GM_READYconstantLazarus message sent when the grid can display its editing controls.
GM_SELECTALLconstantLazarus message for selecting the content in a grid edit control.
GM_SETBOUNDSconstantLazarus message for setting the bounds for a grid edit control.
GM_SETGRIDconstantLazarus message for setting the grid for an edit control.
GM_SETMASKconstantLazarus message for setting the edit mask used in a grid edit control.
GM_SETPOSconstantLazarus message for setting the position of a grid edit control.
GM_SETVALUEconstantLazarus message for setting the value in a grid edit control.
GRIDFILEVERSIONconstantCurrent revision level for the grids.pas file.
soAllconstantAll save options available for grid controls.

Variables

varCellpaddingvariableDefault padding for the content in grid cells.
varColRowBorderTolerancevariableProximity threshold for a mouse click near a column boundary.
varRubberSpacevariableDefault padding for the rubber banding rectangle in grid cells.

Topics

HowToUseGridstopicHow to use Grids including StringGrids, DrawGrids and DbGrids.

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.