[Overview][Types][Classes][Index] |
Deletes the line of text at the specified position.
Source position: textstrings.pas line 84
public procedure TTextStrings.Delete( |
Index: Integer |
); override; |
Index |
|
Ordinal position for the value removed from the Strings property. |
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.
Raises an EStringListError exception when Index is not a valid position in the list of string values.
|
Clears and builds the array with the line ranges for the values in Text. |
|
|
Contains the textual representation for the values in Strings. |
|
|
TTextLineRange - record structure showing start and end of line in text, the line as a string, and any user data. |
|
Version 4.0 | Generated 2025-05-03 | Home |