Sign in Join
FPDoc Onlineexperiment

TValueListEditor.SetRowCount procedure

Member of TValueListEditorprotectedIn unit ValEdit

Sets the value in the RowCount property.

Declaration

pascal
procedure SetRowCount(AValue: Integer)

Arguments

AValue

New value for the property.

Description

SetRowCount is an overridden procedure used to set the value in the RowCount property. AValue contains the new value for the property.

AValue cannot contain a value smaller than the number of FixedRows for the grid control. An EGridException exception is raised when AValue is less than the number of FixedRows for the control.

SetRowCount uses the RowCount value inherited from the grid to determine if any actions are required in the method. No actions are performed in the method when the inherited RowCount contains the same value as AValue.

SetRowCount ensures that the Strings property contains the number of entries needed for the new property value minus the FixedRows for the grid. Lines are added to or deleted from Strings until the number of entries matches the needed value.

Errors

Raises an EGridException exception with the message in rsFixedRowsTooBig when the number of FixedRows is larger than the new value for the property.

See also

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