Hallo, ich habe ein Problem und es wäre toll wenn da jemand eine Idee zu hätte.
Also folgendes ich will die Einträge zweier Listboxen an
bestimmten Stellen vergleichen.
Also zB so:
Listbox1
02
04
03
05
Listbox2
01 02
03 04
Hier sollte dann nur 05 übertragen werden, da der Wert nicht in Listbox2 enthalten ist.
Ich habe es mit einer Schleife versucht, war aber weniger erfolgreich....
Delphi-Quellcode:
for s := 0 to listbox1.items.count -1 do
begin
for t := 0 to listbox2.items.count -1 do
begin
if (listbox1.Items[s][1]) + (listbox1.Items[s][4]) =
(listbox2.Items[t][1]) + (listbox2.Items[t][4])then break
else
if (listbox1.Items[s][1]) + (listbox1.Items[s][4]) =
(listbox2.Items[t][7]) + (listbox2.Items[t][10]) then break
else
if (listbox1.Items[s][1]) + (listbox1.Items[s][4]) <>
(listbox2.Items[t][1]) + (listbox2.Items[t][4])then
begin
if (listbox1.Items[s][1]) + (listbox1.Items[s][4]) <>
(listbox2.Items[t][7]) + (listbox2.Items[t][10]) then
stringgrid1.Rows[0].Add (listbox1.items[s][8] + ' ' +
listbox1.items[s][10] + ' ' + listbox1.items[s][12] + ' v');
end;
end;
end;