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

TCustomDrawGrid

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

TCustomDrawGrid - Base Class for drawn grids including TDrawGrid and TStringGrid

Declaration

Source position: grids.pas line 1022

type TCustomDrawGrid = class(TCustomGrid)

protected

  FGrid: TVirtualGrid;

  

  procedure CalcCellExtent(); virtual;

  

CalcCellExtent - calculate the dimensions required for the cell specified by aCol, aRow

  procedure ColRowDeleted(); override;

  

  procedure ColRowExchanged(); override;

  

  procedure ColRowInserted(); override;

  

  procedure ColRowMoved(); override;

  

  function CreateVirtualGrid; virtual;

  

  procedure DrawCell(); override;

  

  procedure DrawCellAutonumbering(); virtual;

  

  procedure DrawFocusRect(); override;

  

  function GetEditMask(); override;

  

  function GetEditText(); override;

  

  procedure HeaderClick(); override;

  

  procedure HeaderSized(); override;

  

  procedure NotifyColRowChange();

  

  function SelectCell(); override;

  

  procedure SetColor(); override;

  

  procedure SetEditText(); override;

  

  procedure SizeChanged(); override;

  

public

  constructor Create(); override;

  

  destructor Destroy; override;

  

  procedure DeleteColRow();

  

Delete either a column or a row (specified by index), depending on the value of the boolean IsColumn

  procedure ExchangeColRow();

  

Exchange either a column or a row, specified by index, with the col or row specified by WithIndex; boolean IsColumn determines whether rows or columns are to be exchanged

  procedure InsertColRow();

  

  procedure MoveColRow();

  

Move column or row from FromIndex to ToIndex; boolean IsColumn specifies whether col or row is to be moved

  procedure SortColRow();

  

Sort column or row specified by index and optionally by FromIndex and ToIndex; IsColumn specifies whether col or row is to be sorted

  procedure DefaultDrawCell(); virtual;

  

Use the default method for drawing a cell specified by aCol, aRow, at location aRect with state aState

  property AllowOutboundEvents;

  

  property BorderColor;

  

  property Canvas;

  

  property Col;

  

  property ColWidths;

  

  property Editor;

  

  property EditorBorderStyle;

  

  property EditorMode;

  

  property ExtendedColSizing;

  

  property AltColorStartNormal;

  

Using the alt colour as background on alternate rows; start with the normal colour on the first row.

  property FastEditing;

  

  property FocusColor;

  

  property FocusRectVisible;

  

  property GridHeight;

  

  property GridLineColor;

  

  property GridLineStyle;

  

  property GridWidth;

  

  property IsCellSelected;

  

  property LeftCol;

  

  property Row;

  

  property RowHeights;

  

  property SaveOptions;

  

  property SelectedColor;

  

  property SelectedColumn;

  

  property Selection;

  

  property StrictSort;

  

  property TopRow;

  

  property UseXORFeatures;

  

  property Align;

  

  property Anchors;

  

  property AutoAdvance;

  

  property AutoFillColumns;

  

  property BorderSpacing;

  

  property BorderStyle;

  

  property Color;

  

  property ColCount;

  

  property Columns;

  

  property Constraints;

  property DefaultColWidth;

  

  property DefaultDrawing;

  

  property DefaultRowHeight;

  

  property Enabled;

  

  property FixedColor;

  

  property FixedCols;

  

  property FixedHotColor;

  

  property FixedRows;

  

  property Flat;

  

  property Font;

  

  property GridLineWidth;

  

  property Options;

  

  property ParentShowHint;

  

  property PopupMenu;

  

  property RowCount;

  

  property ScrollBars;

  

  property ShowHint;

  

  property TabOrder;

  

  property TabStop;

  

  property Visible;

  

  property VisibleColCount;

  

  property VisibleRowCount;

  

  property OnBeforeSelection;

  

  property OnClick;

  

  property OnColRowDeleted: TGridOperationEvent; [rw]

  

Event handler when a grid column or row is deleted

  property OnColRowExchanged: TGridOperationEvent; [rw]

  

Event handler when a grid column or row has its position exchanged with another

  property OnColRowInserted: TGridOperationEvent; [rw]

  

Event handler when a column or row is inserted into the grid

  property OnColRowMoved: TGridOperationEvent; [rw]

  

Event handler when a grid column or row is moved

  property OnCompareCells;

  

Event handler for comparing the contents of cells

  property OnContextPopup;

  property OnDblClick;

  

  property OnDragDrop;

  property OnDragOver;

  property OnDrawCell;

  

Event handler for drawing a cell

  property OnEditButtonClick;

  

  property OnEndDock;

  property OnEndDrag;

  property OnEnter;

  

  property OnExit;

  

  property OnGetEditMask: TGetEditEvent; [rw]

  

Event handler for finding the edit mask while editing a grid cell

  property OnGetEditText: TGetEditEvent; [rw]

  

Event handler for finding the text to be edited in a grid cell

  property OnHeaderClick: THdrEvent; [rw]

  

Event handler when a column or row header is clicked

  property OnHeaderSized: THdrEvent; [rw]

  

Event handler when a column or row header is re-sized

  property OnKeyDown;

  

  property OnKeyPress;

  

  property OnKeyUp;

  

  property OnMouseDown;

  

  property OnMouseMove;

  

  property OnMouseUp;

  

  property OnMouseWheelDown;

  

  property OnMouseWheelUp;

  

  property OnPickListSelect;

  

  property OnPrepareCanvas;

  

  property OnSelectEditor;

  

  property OnSelection;

  

  property OnSelectCell: TOnSelectCellEvent; [rw]

  

Event handler when a grid cell is selected

  property OnSetEditText: TSetEditEvent; [rw]

  

Event handler for storing the text that has been edited in a cell

  property OnStartDock;

  property OnStartDrag;

  property OnTopleftChanged;

  

  property OnUTF8KeyPress;

end;

Inheritance

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

  

The base class for all windowed controls

|

TControl

  

TControl - the main ancestor class for visual controls.

|

TLCLComponent

?

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.