Autor Beitrag
Land-Gull
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 51

SuSe 9.2, WIN XP
D7 Enter
BeitragVerfasst: So 12.03.06 13:05 
Hi,
ich will in meinem Programm überprüfen ob ein Eintrag bereits in einer Combobox vorhanden ist.
Das ganze soll allerdings nicht zu kompliziert werden.


ausblenden Delphi-Quelltext
1:
2:
if not Id3.GetId3(DirectoryListbox1.Directory+'\'+FileRec[i].Name).Artist in Combobox1.Items then
Combobox1.Items.Add(Id3.GetId3(DirectoryListbox1.Directory+'\'+FileRec[i].Name).Artist) ;


Das funktioniert wahrscheinlich nicht, da Combobox1.Items keine Menge ist.
Wie kann ich mein Problem lösen ohne allerdings zu viel Programmcode zu verwenden und alle Einrtäge per Schleife zu überprüfen?

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: So 12.03.06 13:10 
Hallo!

Schau Dir mal die Methode "IndexOf" der Combobox-Items an.

Grüße
Christian

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".