TStringList is the basic implementation of the
TStrings class, which is also the base class for most of the "multi-line text" storage properties such as
TListBox.Items,
TMemo.Lines, etc.
What you would do, for example, would be something like:
{ Load the text }
TheText := TStringList.Create;
TheText.LoadFromFile('somefile.txt');
{ Copy it to a memo and a listbox }
Memo.Lines.AddStrings(TheText, True);
ListBox.Items.AddStrings(TheText, True);
As you can see, it's basically a question of copying
TStrings to
TStrings, which could probably be done also as:
Memo.Lines.Assign(TheText);
ListBox.Items.Assign(TheText);
but I've had some surprises with
Assign in the past, so I tend to avoid it unless I know what exactly it is doing and since, in this case, we have that nice
AddStrings() ...