TCustomStringGrid class
The base class for TStringGrid.
Declaration
TCustomStringGrid = class(TCustomDrawGrid)Inheritance
- TCustomStringGrid
- TCustomDrawGrid
- TCustomGrid
- TCustomControl
- TWinControl
- TControl
- TLCLComponent
TComponent
Descends from it: TStringGrid TValueListEditor
Description
TCustomStringGrid is a
TCustomDrawGrid descendant which
implements the base class for
TStringGrid.
TCustomStringGrid provides the familiar tabular format used in grid controls,
and is designed for use with string content stored in its cells. Internally,
columns and rows in the class are mapped to TStringGridStrings
instances used to store the values in the grid control. TCustomStringGrid
also allows a TObject instance to be stored for each cell in the grid using
the Objects property.
Additional information about grid usage is available on the Lazarus wiki in the following pages:
See also
- Cells
- Cols
- Rows
- Objects
- OnCellProcess
- HowToUseGrids
Properties
Modified | protected | Indicates whether the content in the grid cells has been changed. |
Cells | public | Provides indexed access to a cell value by its column and row number. |
Cols | public | Provides indexed access to the list of values for the specified column number. |
DefaultTextStyle | public | Default style used to display text including alignment, layout, wrapping, et. al. |
EditorMode | public | True when the Editor is ready to modify the value for the current cell. |
ExtendedSelect | public | Controls whether extending the current cell selection(s) on the control is enabled. |
Objects | public | Provides indexed access to a TObject instance associated with the cell. |
Rows | public | Provides indexed access to the list of column values for the specified row number. |
UseXORFeatures | public | When True, the dotted focus rectangle is painted using an XOR raster operation. |
ValidateOnSetSelection | public | Controls validation when the text for the selected cell is changed. |
Methods
AssignTo | protected | Assigns values from the current class instance to the target class instance. |
AutoAdjustColumn | protected | Adjusts the column size for the font, text length, and images used in the specified column. |
CalcCellExtent | protected | Deprecated in the ancestor class. |
DefineProperties | protected | Defines non-published properties included in LCL component streaming. |
DefineCellsProperty | protected | Defines the reader and writer for the Cells property in a TFiler instance. |
DoCompareCells | protected | Performs a comparison between the specified cells in the grid control. |
DoCopyToClipboard | protected | Performs actions needed to copy a cell or a text selection to the clipboard. |
DoCutToClipboard | protected | Performs actions needed to cut a cell or a text selection to the clipboard. |
DoPasteFromClipboard | protected | Pastes data from the clipboard into the grid control. |
DoCellProcess | protected | Performs actions needed when cell values are copied or pasted using the clipboard. |
DrawColumnText | protected | Draws the text and image for a grid column title at the specified cell coordinates. |
DrawTextInCell | protected | Draws the text for the specified cell in a given drawing state. |
DrawCellAutonumbering | protected | Performs auto-numbering for a cell in the grid. |
GetCells | protected | Gets the value for the indexed Cells property. |
GetCheckBoxState | protected | Gets the state for a cell displayed as a Checkbox. |
GetEditText | protected | Gets the text displayed in the Editor for the specified cell. |
LoadContent | protected | Loads configuration settings from the specified XML configuration file. |
Loaded | protected | Performs actions when LCL component streaming has been completed. |
SaveContent | protected | Saves configuration settings from SaveOptions and optionally values from Cells in the specified XML configuration file. |
SelectionSetText | protected | Stores the specified Tab-separated values to the Selection in the grid. |
SelectionSetHTML | protected | Sets the value for the current Selection to the specified HTML content. |
SetCells | protected | Sets the value for the indexed Cells property. |
SetCheckboxState | protected | Sets the checked state for a check box in the specified cell. |
SetEditText | protected | Locks, updates, and unlocks the editor and cell text at the specified coordinates. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
AutoSizeColumn | public | Automatically adjusts the width of a column to accommodate the widest text value in the column. |
AutoSizeColumns | public | Resizes all columns to accommodate the longest text value in each column. |
Clean | public | Removes cell content which match the specified options. |
CopyToClipboard | public | Copies the current Selection range to the clipboard. |
InsertRowWithValues | public | Inserts a row at the specified row position with the specified cell values. |
LoadFromCSVStream | public | Loads the grid content from the delimited values in AStream. |
LoadFromCSVFile | public | Loads the grid from a file with delimited values for the columns and rows. |
SaveToCSVStream | public | Saves grid content as comma-separated values in the specified stream instance. |
SaveToCSVFile | public | Saves grid content as comma-separated values in the specified file name. |
Events
OnCellProcess | protected | Event handler signalled when copying or pasting content for Cells in the grid. |
Inherited
From TCustomDrawGrid (139)
Align AllowOutboundEvents AltColorStartNormal Anchors AutoAdvance AutoFillColumns BorderColor BorderSpacing BorderStyle Canvas CellClick Col ColCount Color ColRow ColRowDeleted ColRowExchanged ColRowInserted ColRowMoved Columns ColWidths Constraints CreateVirtualGrid DefaultColWidth DefaultDrawCell DefaultDrawing DefaultRowHeight DeleteCol DeleteColRow DeleteRow DisabledFontColor DrawCell DrawFocusRect Editor EditorBorderStyle Enabled ExchangeColRow ExtendedColSizing FadeUnfocusedSelection FastEditing FixedColor FixedCols FixedGridLineColor FixedHotColor FixedRows Flat FocusColor FocusRectVisible Font GetEditMask GridHeight GridLineColor GridLineStyle GridLineWidth GridMouseWheel GridWidth HeaderClick HeaderSized HeaderSizing InsertColRow IsCellSelected KeyDown LeftCol MoveColRow NotifyColRowChange OnAfterSelection OnBeforeSelection OnButtonClick OnClick OnColRowDeleted OnColRowExchanged OnColRowInserted OnColRowMoved OnCompareCells OnContextPopup OnDblClick OnDragDrop OnDragOver OnDrawCell OnEditButtonClick OnEndDock OnEndDrag OnEnter OnExit OnGetCheckboxState OnGetEditMask OnGetEditText OnHeaderClick OnHeaderSized OnHeaderSizing OnKeyDown OnKeyPress OnKeyUp OnMouseDown OnMouseEnter OnMouseLeave OnMouseMove OnMouseUp OnMouseWheel OnMouseWheelDown OnMouseWheelUp OnPickListSelect OnPrepareCanvas OnSelectCell OnSelectEditor OnSelection OnSetCheckboxState OnSetEditText OnStartDock OnStartDrag OnTopleftChanged OnUTF8KeyPress OnValidateEntry Options Options2 ParentShowHint PopupMenu Row RowCount RowHeights SaveOptions ScrollBars SelectCell SelectedColor SelectedColumn Selection SetColor ShowHint SizeChanged SortColRow StrictSort TabAdvance TabOrder TabStop ToggleCheckbox TopRow Visible VisibleColCount VisibleRowCount
From TCustomGrid (283)
AddSelectedRange AdjustClientRect AdjustEditorBounds AdjustInnerCellRect AfterMoveSelection AlternateColor AutoAdjustColumns AutoEdit BeforeMoveSelection BeginAutoDrag BeginUpdate BoxRect CacheMouseDown CalcAutoSizeColumn CalcFocusRect CalcMaxTopLeft CalcScrollbarsRange CalculatePreferredSize CanEditShow CanGridAcceptKey CellExtent CellHintPriority CellRect CellToGridZone CheckLimits CheckLimitsWithError CheckNewCachedSizes CheckPosition Clear ClearCols ClearRows ClearSelections Click CMBiDiModeChanged CMMouseEnter CMMouseLeave ColRowDraggingCursor ColRowDragIndicatorColor ColRowToOffset ColSizingCursor ColumnClickSorts ColumnFromGridColumn ColumnIndexFromGridColumn ColumnsChanged ColWidthsChanged CreateColumns CreateParams CreateWnd CursorState DblClick DefaultColWidthIsStored DefaultRowHeightIsStored DestroyHandle DialogChar DoAutoAdjustLayout DoEditButtonClick DoEditorHide DoEditorShow DoEnter DoExit DoLoadColumn DoMouseWheel DoMouseWheelDown DoMouseWheelLeft DoMouseWheelRight DoMouseWheelUp DoOnChangeBounds DoOnResize DoOPDeleteColRow DoOPExchangeColRow DoOPInsertColRow DoOPMoveColRow DoPrepareCanvas DoSaveColumn DoSetBounds DoUTF8KeyPress DragDx DrawAllRows DrawBorder DrawButtonCell DrawCellGrid DrawCellText DrawColRowMoving DrawColumnTitleImage DrawEdges DrawFillRect DrawGridCheckboxBitmaps DrawRow DrawThemedCell EditButtonClicked EditingAllowed EditingDone EditorByStyle EditorCanAcceptKey EditordoGetValue EditordoResetValue EditordoSetValue EditorHide EditorIsReadOnly EditorKey EditorKeyDown EditorKeyPress EditorKeyUp EditorLocked EditorOptions EditorSelectAll EditorShow EditorShowInCell EditorShowing EditorTextChanged EditorUTF8KeyPress EditorWidthChanged EndUpdate EraseBackground ExtendedRowSizing FirstGridColumn FixDesignFontsPPI FixedGrid FlipPoint FlipRect FlipX Focused FontChanged GCache GetAutoFillColumnInfo GetCellHintText GetColumnAlignment GetColumnColor GetColumnFont GetColumnLayout GetColumnReadonly GetColumnTitle GetColumnWidth GetDefaultColumnAlignment GetDefaultColumnLayout GetDefaultColumnReadOnly GetDefaultColumnTitle GetDefaultColumnWidth GetDefaultEditor GetDefaultRowHeight GetDeltaMoveNext GetFirstVisibleColumn GetFirstVisibleRow GetFixedcolor GetGridDrawState GetImageForCheckBox GetIsCellSelected GetIsCellTitle GetLastVisibleColumn GetLastVisibleRow GetPxTopLeft GetSBRanges GetSBVisibility GetScrollBarPosition GetSelectedColor GetSelectedState GetSmoothScroll GetTitleShowPrefix GetTruncCellHintText GridColumnFromColumnIndex GridFlags HasMultiSelection HeaderHotZones HeaderPushZones HideCellHintWindow HideSortArrow ImageIndexSortAsc ImageIndexSortDesc InplaceEditor InternalSetColCount Invalidate InvalidateCell InvalidateCol InvalidateFocused InvalidateFromCol InvalidateGrid InvalidateRange InvalidateRow IsCellVisible IsColumnIndexValid IsColumnIndexVariable IsEmptyRow IsFixedCellVisible IsMouseOverCellButton IsRowIndexValid IsRowIndexVariable KeyPress KeyUp LoadFromFile LoadFromStream LoadGridOptions LockEditor MouseButtonAllowed MouseCoord MouseDown MouseMove MouseToCell MouseToGridZone MouseToLogcell MouseUp MouseWheelOption MoveExtend MoveNextAuto MoveNextSelectable MoveSelection Notification OffsetToColRow OnCheckboxToggled OnGetCellHint OnLoadColumn OnSaveColumn OnUserCheckboxBitmap OnUserCheckboxImage Paint PickListItemSelected PrepareCanvas PrepareCellHints RangeContains RangeSelectMode ResetDefaultColWidths ResetEditor ResetLastMove ResetOffset ResetSizes ResizeColumn ResizeRow RowHeightsChanged RowSizingCursor RTLSign SaveGridOptions SaveToFile SaveToStream ScaleFontsPPI ScrollBarAutomatic ScrollBarIsVisible ScrollBarPage ScrollBarPosition ScrollBarRange ScrollBarShow ScrollBy SelectActive SelectEditor SelectedRange SelectedRangeCount SetBorderStyle SetCanvasFont SetColCount SetColRow SetCursor SetFadeUnfocusedSelection SetFixedcolor SetFixedCols SetFixedRows SetFocus SetRawColWidths SetSelectedColor ShowCellHintWindow Sort SortColumn SortOrder StartPushCell TitleFont TitleImageList TitleImageListWidth TitleStyle TopLeftChanged TryMoveSelection TrySmoothScrollBy UnLockEditor UnprepareCellHints UpdateBorderStyle UpdateHorzScrollBar UpdateSelectionRange UpdateVertScrollbar ValidateEntry VisualChange WMHScroll WMKillFocus WMSetFocus WMSize WMVScroll WndProc WSRegisterClass
From TCustomControl (4)
From TWinControl (204)
AddControl AlignControls AllAutoSized AutoAdjustLayout AutoSizeDelayed AutoSizeDelayedHandle AutoSizeDelayedReport AutoSizePhases BeginUpdateBounds BorderWidth BoundsLockCount BroadCast Brush BrushCreated CachedClientHeight CachedClientWidth CanFocus CanSetFocus CanTab ChangeScale ChildClassAllowed ChildHandlesCreated ChildKey ChildSizing ClientRectNeedsInterfaceUpdate CMBorderChanged CMDoubleBufferedChanged CMEnabledChanged CMEnter CMExit CMParentDoubleBufferedChanged CMShowHintChanged CMShowingChanged CMVisibleChanged CNChar CNKeyDown CNKeyUp CNSysKeyDown CNSysKeyUp ContainsControl ControlAtPos ControlCount ControlKeyDown ControlKeyUp Controls ControlsAligned CreateBrush CreateDockManager CreateHandle CreateParented CreateParentedControl CreateSubClass CustomAlignInsertBefore CustomAlignPosition DefaultHandler DefWndProc DesignerDeleting DisableAlign DoAddDockClient DoAdjustClientRectChange DoAlignChildControls DoAllAutoSize DoAutoSize DoChildSizingChange DockClientCount DockClients DockDrop DockManager DockOver DockSite DoConstraintsChange DoDockClientMsg DoDockOver DoDragMsg DoFlipChildren DoFloatMsg DoGetDockCaption DoKeyDownBeforeInterface DoKeyPress DoKeyUpBeforeInterface DoRemainingKeyDown DoRemainingKeyUp DoRemoveDockClient DoSendBoundsToInterface DoSendShowHideToInterface DoubleBuffered DoUnDock DoUndockClientMsg EnableAlign EndUpdateBounds FinalizeWnd FindChildControl FindNextControl FixDesignFontsPPIWithChildren FixupTabList FlipChildren FormEndUpdated GetAdjustedLogicalClientRect GetBorderStyle GetChildren GetChildrenRect GetClientOrigin GetClientRect GetControlIndex GetControlOrigin GetDeviceContext GetDockCaption GetEnumeratorControls GetEnumeratorControlsReverse GetMouseCapture GetParentHandle GetPreferredSizeClientFrame GetSiteInfo GetTabOrderList GetTextLen GetTopParentHandle Handle HandleAllocated HandleNeeded InitializeWnd InsertControl IntfGetDropFilesTarget IntfUTF8KeyPress InvalidateBoundsRealized InvalidateClientRectCache InvalidatePreferredChildSizes IsClientHeightStored IsClientWidthStored IsControlMouseMsg IsFlipped IsResizing IsSpecialSubControl KeyDownAfterInterface KeyDownBeforeInterface KeyUpAfterInterface KeyUpBeforeInterface LockRealizeBounds MainWndProc NotifyControls OnAlignInsertBefore OnAlignPosition OnDockDrop OnDockOver OnGetDockCaption OnGetSiteInfo OnUnDock PaintControls PaintHandler PaintTo ParentDoubleBuffered ParentFormHandleInitialized ParentHandlesAllocated ParentWindow PerformTab RealGetText ReAlign RealizeBounds RealizeBoundsRecursive RealSetText ReloadDockedControl RemoveControl RemoveFocus Repaint ScaleBy ScaleControls ScrollBy_WS SelectFirst SelectNext SendDialogChar SendMoveSizeMessages SetBounds SetChildZPosition SetControlIndex SetDockManager SetShape SetTempCursor ShowControl Showing UnlockRealizeBounds Update UpdateControlState UpdateDockCaption UpdateShowing UseDockManager UTF8KeyPress VisibleDockClientCount WindowHandle WMChar WMContextMenu WMDestroy WMEnter WMEraseBkgnd WMExit WMKeyDown WMKeyUp WMMove WMNotify WMShowWindow WMSysChar WMSysKeyDown WMSysKeyUp WMWindowPosChanged WriteLayoutDebugReport WSSetText
From TControl (316)
AccessibleDescription AccessibleName AccessibleRole AccessibleValue Action ActionChange ActionLink ActiveDefaultControlChanged AddHandler AddHandlerOnBeforeDestruction AddHandlerOnChangeBounds AddHandlerOnEnabledChanged AddHandlerOnEnabledChanging AddHandlerOnKeyDown AddHandlerOnMouseWheel AddHandlerOnResize AddHandlerOnVisibleChanged AddHandlerOnVisibleChanging AdjustSize AnchorAsAlign AnchorClient AnchoredControlCount AnchoredControls AnchorHorizontalCenterTo AnchorParallel AnchorSame AnchorSide AnchorSideBottom AnchorSideChanged AnchorSideLeft AnchorSideRight AnchorSideTop AnchorToCompanion AnchorToNeighbour AnchorVerticalCenterTo AutoSize AutoSizing AutoSizingAll AutoSizingLockCount BaseBounds BaseParentClientSize BeforeDestruction BeforeDragStart BeginAutoSizing BeginDrag BiDiMode BoundsChanged BoundsRect BoundsRectForNewParent BringToFront CalculateDockSizes CanAutoSize Caption CaptureChanged CaptureMouseButtons ChangeBounds Changed CheckChildClassAllowed CheckNewParent CheckOnChangeBounds ClientHeight ClientOrigin ClientRect ClientToParent ClientToScreen ClientWidth CMChanged CMCursorChanged CMHintShow CMHitTest CMParentBiDiModeChanged CMParentColorChanged CMParentFontChanged CMParentShowHintChanged CMSysFontChanged CMTextChanged CNPreferredSizeChanged ColorIsStored ConstrainedResize ControlFontClass ControlOrigin ControlState ControlStyle ControlToScreen CreateAccessibleObject CreateControlBorderSpacing CreateFloatingDockSite Cursor DesktopFont DisableAutoSizing DoBorderSpacingChange DoCallKeyEventHandler DoCallMouseWheelEventHandler DoCallNotifyHandler Dock Docked DockOrientation DockTrackNoTarget DoContextPopup DoDock DoEndDock DoEndDrag DoFixDesignFontPPI DoMouseDown DoMouseUp DoMouseWheelHorz DoOnParentHandleDestruction DoOnShowHint DoScaleFontPPI DoStartDock DoStartDrag DragCanceled DragCursor DragDrop Dragging DragKind DragMode DragOver EnableAutoSizing EnabledChanged EnabledChanging EndAutoSizing EndDrag ExecuteCancelAction ExecuteDefaultAction FindSubComponent Floating FloatingDockSiteClass ForeignAnchorSideChanged FormIsUpdating GetAccessibleObject GetAction GetActionLinkClass GetAnchorsDependingOnParent GetCachedText GetCanvasScaleFactor GetChildAccessibleObjectAtPos GetClientScrollOffset GetColorResolvingParent GetControlClassDefaultSize GetCursor GetDefaultColor GetDefaultDockCaption GetDefaultHeight GetDefaultWidth GetDockEdge GetDragImages GetEnabled GetFloating GetFloatingDockSiteClass GetLogicalClientRect GetMousePosFromMessage GetPalette GetParentBackground GetParentComponent GetPopupMenu GetPreferredSize GetRGBColorResolvingParent GetScrolledClientRect GetSelectedChildAccessibleObject GetSidePosition GetTextBuf GetTopParent HandleObjectShouldBeVisible HasHelp HasParent Height HeightIsAnchored HelpContext HelpKeyword HelpType Hide Hint HostDockSite InitiateAction InvalidateControl InvalidatePreferredSize IsAParentAligning IsBorderSpacingInnerBorderStored IsCaptionStored IsControl IsControlVisible IsEnabled IsParentColor IsParentFont IsParentOf IsProcessingPaintMsg IsRightToLeft IsVisible Left LMCaptureChanged LoadedAll LRDockWidth ManualDock ManualFloat MouseCapture MouseEnter MouseInClient MouseLeave OnChangeBounds OnConstrainedResize OnEditingDone OnMouseWheelHorz OnMouseWheelLeft OnMouseWheelRight OnQuadClick OnResize OnShowHint OnTripleClick Parent ParentBackground ParentBiDiMode ParentColor ParentDestroyingHandle ParentFont ParentFontChanged ParentToClient Perform PositionDockRect QuadClick ReadBounds ReadState Refresh RemoveAllHandlersOfObject RemoveHandler RemoveHandlerOnBeforeDestruction RemoveHandlerOnChangeBounds RemoveHandlerOnEnabledChanged RemoveHandlerOnEnabledChanging RemoveHandlerOnKeyDown RemoveHandlerOnMouseWheel RemoveHandlerOnResize RemoveHandlerOnVisibleChanged RemoveHandlerOnVisibleChanging ReplaceDockedControl RequestAlign Resize Scale96ToFont Scale96ToForm Scale96ToScreen ScaleConstraints ScaleDesignToForm ScaleFontTo96 ScaleFontToScreen ScaleFormTo96 ScaleFormToDesign ScaleScreenTo96 ScaleScreenToFont ScreenToClient ScreenToControl SendToBack SessionProperties SetAction SetAlign SetAnchors SetAutoSize SetBiDiMode SetBoundsKeepBase SetDragMode SetEnabled SetHint SetInitialBounds SetName SetParent SetParentBackground SetParentBiDiMode SetParentComponent SetTextBuf SetVisible SetZOrder ShouldAutoAdjust Show ShowHelp TBDockHeight Text TextChanged Top TripleClick UndockHeight UndockWidth UpdateAnchorRules UpdateBaseBounds UpdateMouseCursor UpdateRolesForForm UseRightToLeftAlignment UseRightToLeftReading UseRightToLeftScrollBar VisibleChanged VisibleChanging Width WidthIsAnchored WindowProc WMCancelMode WMLButtonDBLCLK WMLButtonDown WMLButtonQuadCLK WMLButtonTripleCLK WMLButtonUp WMMButtonDBLCLK WMMButtonDown WMMButtonQuadCLK WMMButtonTripleCLK WMMButtonUp WMMouseHWheel WMMouseMove WMMouseWheel WMRButtonDBLCLK WMRButtonDown WMRButtonQuadCLK WMRButtonTripleCLK WMRButtonUp WMXButtonDBLCLK WMXButtonDown WMXButtonQuadCLK WMXButtonTripleCLK WMXButtonUp
From TLCLComponent (6)
DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance WidgetSetClass
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
