Combo Box sur Delphi

Résolu
Maxxx_^ Messages postés 8 Date d'inscription   Statut Membre Dernière intervention   -  
Maxxx_^ Messages postés 8 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,
J'ai dans ma ComboBox 4 truc dont un appelé 'toto', je souhaite le supprimer à partir de son nom donc faire un truc du genre ComboBox.Delete('toto') mais c'est pas ça :p.
Si quelqu'un peut me renseigner, je suis sous Delphi7.
Merci
Configuration: Windows XP
Firefox 3.0.8

1 réponse

  1. Maxxx_^ Messages postés 8 Date d'inscription   Statut Membre Dernière intervention  
     
    C'est bon j'ai trouvé ^^
    Voici la réponse :
    Var
    i: Integer;

    begin
    for i := 0 to Combobox2.Items.Count - 1 do
    begin
    if Combobox2.Items[i] = 'TCP_Client_' +IPAddress +':' +IntToStr(Port) then
    begin
    Combobox2.Items.Delete(i);
    if Combobox2.ItemIndex = i
    then Combobox2.Text := '';
    Break;
    end;
    end;
    end;
    0