TTextStrings.Delete procedure
Deletes the line of text at the specified position.
Declaration
procedure Delete(Index: Integer); overrideArguments
Index | Ordinal position for the value removed from the Strings property. |
Description
Delete is an overridden method used to delete the line of text at
the specified position.
BuildArrays is called to populate the
internal array of
TTextLineRange instances when the internal
validity flag is not set.
Index contains the ordinal position in
Strings for the
line of text removed in the method. Index must be in the range
0..Count-1 or an
EStringListError exception is
raised.
Line range information is used to adjust both Text and the
internal array of TTextLineRange instance. The line, including end-of-line
characters, is removed from Text. The line counter is decremented, and the
array of line ranges is updated. Line ranges after Index are updated to move
their start and end positions downward by the length of the removed line. The
memory at the end of the line ranges is zero-filled to prevent corruption.
Errors
Raises an EStringListError exception when Index is not a valid position in the list of string values.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
