Einzelnen Beitrag anzeigen

angos

Registriert seit: 26. Mai 2004
Ort: Rheine
549 Beiträge
 
Delphi 11 Alexandria
 
#7

Re: Einträge zweier Listboxen an bestimmten Stellen vergl.

  Alt 15. Okt 2008, 14:35
hoffe ich hab dich richtig verstanden:
Delphi-Quellcode:
[...]
var
  s, t: integer;
  bGefunden: Boolean;
begin
  for s := 0 to listbox1.items.count -1 do
  begin
    bGefunden := False;
    for t := 0 to listbox2.items.count -1 do
    begin
      if pos(ListBox1.Items[s], ListBox2.Items[t]) then
      begin
        bGefunden := True;
        Break;
      end;
    end;
    if not bGefunden then
    begin
      // ListBox1.Items[s] kommt nicht in ListBox2 vor. Mach nun was du willst
    end;
  end;
end;
[...]
Gruß
Ansgar
Ansgar
  Mit Zitat antworten Zitat