[Overview][Types][Classes][Index] | Reference for unit 'TextStrings' (#lcl)

# TTextStrings

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TTextStrings a TStrings descendant that is optimized for handling the complete text as whole (instead of line by line as in TStringList)

## Declaration

Source position: textstrings.pas line 45

`type TTextStrings = class(TStrings)`
`protected`
`FArraysValid: Boolean;` |  | FArraysValid - local boolean flag to indicate whether arrays are valid
`FLineCount: Integer;` |  | FLineCount - local variable with number of lines
`FLineCapacity: Integer;` |  | FLineCapacity - local variable with capacity of lines
`FLineRanges: ;` |  | FLineRanges - local variable, a pointer to an array of TTextLineRange
`FText: String;` |  | FText - local variable holding the test string under consideration
`FUpdateCount: Integer;` |  |
`FChangedWhileUpdate: Boolean;` |  | FChangedWhileUpdate - local flag to indicate whether there were changes during the update
`function GetTextStr; override;` |  |
`procedure SetTextStr(); override;` |  |
`procedure BuildArrays; virtual;` |  | BuildArrays - method for building arrays
`function GetCount; override;` |  |
`procedure Changed; virtual;` |  | Changed - software emulation of OnChange event
`procedure Changing; virtual;` |  | Changing - software emulation of OnChanging event
`function Get(); override;` |  |
`procedure ClearArrays;` |  | ClearArrays - method for clearing arrays
`function GetObject(); override;` |  |
`procedure Put(); override;` |  |
`procedure PutObject(); override;` |  |
`function GetLineLen();` |  | GetLineLen - returns length of indexed line (including new characters if boolean flag set True)
`function GetLineEnd();`
`function HasObjects;`
`function CountLineEndings();`
`public`
`destructor Destroy; override;` |  |
`procedure Clear; override;` |  |
`procedure SetText(); override;` |  |
`procedure Insert(); override;` |  |
`procedure Delete(); override;` |  |
`procedure Exchange(); override;` |  |
`procedure Move(); override;` |  |
`procedure MakeTextBufferUnique;` |  | MakeTextBufferUnique - makes the current text buffer unique
`procedure BeginUpdate;` |  |
`procedure EndUpdate;` |  |
`function GetText; override;` |  |
`function IndexOf(); override;` |  |
`function Add(); override;` |  |
`function AddObject(); override;`
`procedure AddStrings(); override;` |  |
`property Text: String; [rw]` |  |
`property OnChange: TNotifyEvent; [rw]` |  | OnChange - event handler for a change in the data or text
`property OnChanging: TNotifyEvent; [rw]` |  | OnChanging - event handler for use while the data or text are changing
`end;`

## Inheritance

`TTextStrings` |  | TTextStrings a TStrings descendant that is optimized for handling the complete text as whole (instead of line by line as in TStringList)
`TStrings`
`TObject`

The latest version of this document can be found at lazarus-ccr.sourceforge.net.