You are not using a valid .ini format, so this will not be easy. This is much easier if you use a properly formed .ini file.
Valid ini file has the format
[section] akey=value bkey=value ckey=value
Here is an example of reading multiple lines from an INI file. Although it uses TListBox instead of TEdit , this should be enough to get you started.
The code below will also work with an improperly formatted file, but you may have to change the code in the ListBox1Click event to use ReadSectionValues instead and manually parse each item before displaying it; in this case, create another TStringList in the event handler and pass it instead of Memo1.Lines .
With a properly formatted ini file, you can use TIniFile.ReadSection or TMemIniFile.ReadSections to load all sections into a child of TStrings , and then use ReadSection(SectionName) to get the values of each section.
Here is an example - save this ini file somewhere (I used d:\temp\sample.ini :
[A Section] Item1=Item A1 Item2=Item A2 Item3=Item A3 Item4=Item A4 [B Section] Item1=Item B1 Item2=Item B2 Item3=Item B3 Item4=Item B4 [C Section] Item1=Item C1 Item2=Item C2 Item3=Item C3 Item4=Item C4
Here is a sample form code:
unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IniFiles; type TForm2 = class(TForm) ListBox1: TListBox; Memo1: TMemo; procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure ListBox1Click(Sender: TObject); private { Private declarations } FIni: TMemIniFile; public { Public declarations } end; var Form2: TForm2; implementation {$R *.dfm} const IniName = 'd:\Temp\Sample.ini'; procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction); begin FIni.Free; end; procedure TForm2.FormCreate(Sender: TObject); begin FIni := TMemIniFile.Create(IniName); Memo1.Lines.Clear; FIni.ReadSections(ListBox1.Items); end; procedure TForm2.ListBox1Click(Sender: TObject); var Section: string; begin if ListBox1.ItemIndex > -1 then begin Section := ListBox1.Items[ListBox1.ItemIndex]; FIni.ReadSection(Section, Memo1.Lines); end; end; end.
Clicking on the name of each section in the ListBox displays the items in this section, as shown below:

EDIT: OK. I was curious to see how this would work with the contents of the ini file that you posted in your question.
So, I made the following change:
- I copied and pasted your sample into the content verbatim as a new section at the end of the
Sample.ini created above.
Edit the code and click on the new richardmarx item. Here is what I got:

Obviously this will not work. Therefore, I made the following additional changes:
- Changed the
ListBox1Click event to use FIni.ReadSectionValues instead of ReadSection . - Edit the modified application and click on the
C Section element to see how it is displayed, and then the new richardmarx element to see how it is displayed. The results are as follows:

