Sign in Join
FPDoc Onlineexperiment

TCustomGrid.LoadContent procedure

Member of TCustomGridprotectedIn unit Grids

Loads values for the grid control from the specified XML configuration file.

Declaration

pascal
procedure LoadContent(cfg: TXMLConfig; Version: Integer); virtual

Arguments

cfg

Configuration file with values loaded in the method.

Version

LCL Grid version number for the values processed in the method.

Description

LoadContent is a method used to load content from the XML configuration file specified in cfg into the grid control.

Design-time settings for the grid control are loaded from the XML file when soDesign is included in the SaveOptions property and the XML file includes the corresponding values.

Property values loaded in the method include:

  • Color
  • ColCount
  • RowCount
  • FixedCols
  • FixedRows
  • DefaultRowHeight
  • DefaultColWidth
  • ColWidths
  • RowHeights
  • Columns

The LoadGridOptions method is called to load values for the Options and Options2 properties.

The columns and rows visible in the grid control are loaded and restored when they are included in the XML file. This includes the range selection rectangle in RangeSelect when enabled in the Options for the control.

In TCustomGrid, LoadContent does not load the cell values for the control. That process is implemented in descendent classes which handle the data type(s) supported in the implementation.

See also

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