Autor Beitrag
DarkHunter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 477

Win XP
D3 Prof, D2005 PE
BeitragVerfasst: Di 05.07.05 23:29 
Ich habe ein Combox/Stringlist und möchte ein Item daraus löschen.
Ich kenne nur die komplette bezeichnung des items. Wie kann ich das am besten machen?

danke im voraus
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 05.07.05 23:39 
Moin!
ausblenden Delphi-Quelltext
1:
ComboBox1.Items.Delete(ComboBox1.Items.IndexOf('lösch mich'));					

cu
Narses
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mi 06.07.05 09:54 
Anm. zu Narses Code: Bitte beim Löschen mit dieser Variante vorher überprüfen, ob der Index den IndexOf zurückliefert <> -1 ist; gibt sonst ganz häßliche Exceptions...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 06.07.05 11:35 
Moin!

user profile iconBenBE hat folgendes geschrieben:
Anm. zu Narses Code: Bitte beim Löschen mit dieser Variante vorher überprüfen, ob der Index den IndexOf zurückliefert <> -1 ist; gibt sonst ganz häßliche Exceptions...

Hups :oops: peinlich, peinlich, ganz vergessen; war wohl schon zu spät am Abend... :wink:

cu
Narses
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mi 06.07.05 16:31 
:lol: darum ergänze ich doch solche Sachen ... damit andere nicht an sowas denken müssen ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
DarkHunter Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 477

Win XP
D3 Prof, D2005 PE
BeitragVerfasst: Mi 06.07.05 16:55 
und jetzt frage ich mich warum ich die funktion delete nicht gefunden habe.

vielen Dank
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mi 06.07.05 18:06 
user profile iconDarkHunter hat folgendes geschrieben:
und jetzt frage ich mich warum ich die funktion delete nicht gefunden habe.

vielen Dank


Dafür gibt es vier Standard-Gründe, die bitte nicht persönlich zu nehmen sind:
1. DOH unbekannt
2. Nicht gesucht
3. Zu müde
4. Zu faul

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
ceding
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 53

Win XP
D 4
BeitragVerfasst: Mi 06.07.05 18:50 
user profile iconBenBE hat folgendes geschrieben:
und jetzt frage ich mich warum ich die funktion delete nicht gefunden habe.


such den Grund bei doch mal bei dir :wink: nich persönlich nehmen

_________________
Es gibt kein Gott!! Was ist die Seele ?