Sign in Join
FPDoc Onlineexperiment

TValueListEditor.FixedCols property

Member of TValueListEditorpublishedIn unit ValEdit

The number of fixed columns on the control.

Declaration

pascal
property FixedCols: default 0;

Description

FixedCols is a published Integer property in TValueListEditor. It contains the fixed column count for the control. The default value for the property is 0, and causes both the Key and Value columns on the control to be displayed using the background color specified in Color (or ParentColor when enabled).

FixedCols can be changed to 1 to force the Key column to be displayed using the FixedColor and TitleStyle for the control. A value other than 0 or 1 assigned to the property is ignored. Fixed columns are normally displayed on the left edge of the grid and become part of the control which is not scrolled horizontally.

When set to 1, a cell in the Key column cannot be edited using a cell editor at run-time. A cell in the Key column cannot be edited if keyEdit has not been included in KeyOptions - even when FixedCols is set to 0. The cell value can be modified using the Keys property for all combinations of FixedCols and KeyOptions.

Setting a new value for the FixedCols property causes several actions to be performed:

  • The values in FixedCols and FixedRows are verified by calling CheckFixedCount, which can raise an exception if either value is not in range for the grid control.
  • EditorMode is set to False to hide a visible cell Editor on the control.
  • If Columns has been Enabled, UpdateSelectionRange is called to refresh the selection rectangle for the control. ColumnsChanged is called to apply the visual change to the control. If Columns has not been Enabled, MoveNextSelectable and UpdateSelectionRange are called to refresh the cells on the control.

Use FixedRows to get or set the number of fixed rows displayed for the grid control.

Use the Keys property to maintain a key name displayed in a specific row on the control. Use Values to maintain the value associated with a specific key name. Or, use Strings to access key / value pairs on the control.

See also

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