Einzelnen Beitrag anzeigen

Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.757 Beiträge
 
Delphi 10.4 Sydney
 
#17

Re: Logisches problem

  Alt 27. Jan 2007, 17:01
Delphi-Quellcode:
 
if not ComboBox4.Items.IndexOf(ComboBox4.Text)> -1 Then
  begin
    Combobox4.Items.Add(ComboBox4.Text);
  end;
end
Vielleicht so?

Delphi-Quellcode:
if ComboBox4.Items.IndexOf(ComboBox4.Text) <= -1 Then
  begin
    Combobox4.Items.Add(ComboBox4.Text);
  end;
oder so:
Delphi-Quellcode:
if not (ComboBox4.Items.IndexOf(ComboBox4.Text) > -1) Then
  begin
    Combobox4.Items.Add(ComboBox4.Text);
  end;

Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat