I have big problem with StringList. I have text file with text like this:
51,179 km=Powiat Ostrzeszowski
51,179 - 61,402 km=Powiat Wieruszowski
61,402 - 64,559 km (d. DW450)=Powiat Wieruszowski
64,559 km (d. DW450)=Powiat Kępiński
I want to import this file and show first values, before "=" in RadioGroup. Second values after "=" i want to show on Label in moment when user clicks proper value on RadioGroup.
I would like to operate on Names and Values of StrongList.
Something like this: https://i.stack.imgur.com/dkLih.png
In *.pas file I have:
list := TStringList.Create;
RadioGroup1.Visible := true;
for i := 0 to list.Count-1 do
And first values I have on RadioGroup.
I try with RadioGroup like this:
procedure TForm1.RadioGroup1Click(Sender: TObject);
Label.Caption := list.Values[list.Names[RadioGroup1.ItemIndex]];
But doesn't work. What I do wrong?
P.S. Sorry for my English :)