prøv med denne kode:
var
temp : string;
begin
if ListBox1.ItemIndex > -1 then
begin
if Odd(ListBox1.ItemIndex) then
begin
Edit1.Text := ListBox1.Items[ListBox1.ItemIndex-1];
temp := ListBox1.Items[ListBox1.ItemIndex];
Edit2.Text := Copy(temp,1,Pos('-',temp)-2);
Delete(temp,1,Pos('-',temp)+1);
Edit3.Text := Copy(temp,1,Pos('-',temp)-2);
Delete(temp,1,Pos('-',temp)+1);
Edit4.Text := temp;
end
else
begin
Edit1.Text := ListBox1.Items[ListBox1.ItemIndex];
temp := ListBox1.Items[ListBox1.ItemIndex+1];
Edit2.Text := Copy(temp,1,Pos('-',temp)-2);
Delete(temp,1,Pos('-',temp)+1);
Edit3.Text := Copy(temp,1,Pos('-',temp)-2);
Delete(temp,1,Pos('-',temp)+1);
Edit4.Text := temp;
end;
end;