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

TCustomGrid.Clear

Clears all cells in the grid control.

Declaration

Source position: grids.pas line 1341

public procedure TCustomGrid.Clear;

Description

Clear is a method used to removed the content in all areas of the grid control.

EditorMode is set to False to remove an active Editor for the grid control.

The ClearRows and ClearCols methods are called to reset the values in the Cols, Rows, FixedCols, and FixedRows properties. If either method returns False, the content had already been cleared and no additional actions are performed in the method.

Clears resets the values in internal members that are used to track the top, left visible cell in the control and the current selection range. Hot-lighted (hovered) cells are also reset in the method.

Clear calls VisualChange to update the cached column and row sizes and redraw the control. SizeChanged is also called to notify event handlers of changes to RowCount or ColCount values.

Compatibility: This applies to Lazarus grids only; under Delphi/Kylix a grid cannot be completely emptied.

Use FixedRows, FixedCols, RowCount, and ColCount to specify the number of rows or columns on the grid.

See also

TCustomGrid.ClearCols

  

Clears the values in the FixedCols and Cols properties.

TCustomGrid.ClearRows

  

Clears the cached fixed rows and row count values for the grid control.

TCustomGrid.RowCount

  

Number of rows in the grid.

TCustomGrid.ColCount

  

Number of columns in the grid.

TCustomGrid.FixedCols

  

The number of fixed columns in the grid.

TCustomGrid.FixedRows

  

Number of the fixed rows in the grid.

TCustomGrid.EditorMode

  

True when the Editor is ready to modify the value for the current cell.

TCustomGrid.VisualChange

  

Updates the grid after changes to the visual properties in the control.

TCustomGrid.SizeChanged

  

Performs actions needed when the number of columns or rows has been changed.


Version 3.2 Generated 2024-02-25 Home