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

# TCustomStringGrid

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomStringGrid - base class for TStringGrid

## Declaration

Source position: grids.pas line 1433

`type TCustomStringGrid = class(TCustomDrawGrid)`
`protected`
`procedure AssignTo(); override;`
`procedure AutoAdjustColumn(); override;` |  | AutoAdjustColumn - automatically adjust column properties to accommodate largest object
`procedure CalcCellExtent(); override;` |  | CalcCellExtent - calculate the dimensions required for the cell specified by aCol, aRow
`procedure DefineProperties(); override;` |  |
`function DoCompareCells(); override;` |  | DoCompareCells - perform the comparison of two or more cells in a grid
`procedure DoCopyToClipboard; override;` |  | DoCopyToClipboard - copy the selected data to the clipboard, leaving the original data in place
`procedure DoCutToClipboard; override;` |  | DoCutToClipboard - cut the data from its current site and place it on the clipboard
`procedure DoPasteFromClipboard; override;` |  | DoPasteFromClipboard paste the data from the clipboard to the current location
`procedure DrawTextInCell(); override;`
`procedure DrawCellAutonumbering(); override;` |  | DrawCellAutonumbering - draws a cell using auto numbering
`function GetCells(); override;` |  |
`procedure GetCheckBoxState(); override;` |  | GetCheckBoxState - returns the state of the checkbox at the specified position
`function GetEditText(); override;` |  | GetEditText - returns the Edit text string for the specified cell
`procedure LoadContent(); override;` |  | LoadContent - method to load a configuration
`procedure Loaded; override;` |  |
`procedure SaveContent(); override;` |  | SaveContent as specified in the XML configuration variable
`procedure SelectionSetText();` |  | SelectionSetText - stores the text in the selection
`procedure SetCells(); virtual;` |  |
`procedure SetCheckboxState(); override;`
`procedure SetEditText(); override;` |  | SetEditText - specifies the text-string to be placed in the Editor for processing
`property Modified: Boolean; [rw]` |  | Whether or not the current cell has been Modified
`public`
`constructor Create(); override;` |  | Create - constructor for TCustomStringGrid: calls inherited Create then sets up default styles, layout and alignment
`destructor Destroy; override;` |  | Destroy - destructor for TCustomStringGrid: frees maps of columns and rows, then calls inherited Destroy
`procedure AutoSizeColumn();` |  | AutoSizeColumn - automatically adjust width of column to accommodate widest text
`procedure AutoSizeColumns;` |  | AutoSizeColumns - automatically resizes all columns by adjusting them to fit in the longest text in each column
`procedure Clean();` |  | Clean all cells in the grid subject to the given CleanOptions, optionally specifying a range of cells or a rectangular region.
`procedure CopyToClipboard();` |  | CopyToClipboard - copy a range of cells to clipboard
`property Cells: String; [rw]` |  | Cells - the text content of a cell or cells, indexed by aCol, aRow
`property Cols: TStrings; [rw]` |  | Cols - get or set a list of strings for column names as specified by the index
`property DefaultTextStyle;` |  | Default style for displaying text - includes alignment, layout, single or multi-lines
`property EditorMode;` |  | Is grid ready to accept edits? (EditorMode True)
`property ExtendedSelect;` |  | ExtendedSelect - the ability to select cells beyond the boundary of the visible part of the grid
`property Objects: TObject; [rw]` |  | The Objects present in the specified cell
`property Rows: TStrings; [rw]` |  | Rows - gets or sets a list of strings for row names as specified by index
`property UseXORFeatures;` |  | UseXORFeatures: When True, the dotted focus rectangle is painted using the XOR raster operation
`end;`

## Inheritance

`TCustomStringGrid` |  | TCustomStringGrid - base class for TStringGrid
`TCustomDrawGrid` |  | TCustomDrawGrid - Base Class for drawn grids including TDrawGrid and TStringGrid
`TCustomGrid` |  | TCustomGrid - the base class for all grid controls
`TCustomControl` |  | TCustomControl - a base class for many window controls
`TWinControl`
`TControl`
`TLCLComponent` |  | TLCLComponent - base class for LCL components
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

## See also

HowToUseGrids |  | How to use Grids including StringGrids, DrawGrids and DbGrids

The latest version of this document can be found at lazarus-ccr.sourceforge.net .