Autor Beitrag
Fischman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 137

Win XP
D3 Prof / D7
BeitragVerfasst: Fr 07.11.03 07:34 
Hallo Leute,
wer kann mir mal da weiter helfen.Wie kann man bei der ComboBox die erste Zeile weg machen oder verschieben so das der Inhalt gleich zusehen ist,also der erste ItemIndex.

Gruß Uwe
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Fr 07.11.03 07:48 
Hallo,

ich verstehe Deine Frage nicht ganz!?

Den 1. Eintrag löscht Du folgendermaßen:
ausblenden Delphi-Quelltext
1:
ComboBox1.Items.Delete(0);					


Den 1. Eintrag auswählen geht so:
ausblenden Delphi-Quelltext
1:
ComboBox1.ItemIndex:=0;					

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
Fischman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 137

Win XP
D3 Prof / D7
BeitragVerfasst: Fr 07.11.03 08:09 
Ja danke aber das meine ich nicht,wenn man die ComboBox anklickt kommen die ItemIndex erst zum vorschein.Es soll aber schon einer da stehen also der erste.So das man weis was da drin ist.

Gruß Uwe
ErnestoChe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 528

Win 2000 pro, CRUX 2.0
Delphi 6 Pers, Open K3
BeitragVerfasst: Fr 07.11.03 08:38 
Hi,

hat dir doch Smiegel auch beantwortet:

ausblenden Delphi-Quelltext
1:
ComboBox1.ItemIndex := 0;					


MFG

- Ernesto -
Fischman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 137

Win XP
D3 Prof / D7
BeitragVerfasst: Fr 07.11.03 15:41 
Gut Danke an alle und ein schönes Wochenende noch.

Gruß Uwe
Alex
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28


D5 Epr
BeitragVerfasst: Fr 07.11.03 15:54 
wenn Du das in das onCreate Ereignis von Form1 packst dann müßte es gehen
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
 
procedure TForm1.FormCreate(Sender: TObject);
begin
  ComboBox1.ItemIndex:=0;
end;


Gruß, Alex

Moderiert von user profile iconTino: Delphi-Tags hinzugefügt.
Terra23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Fr 07.11.03 16:21 
ComboBox kennt IMHO auch die Eigenschaft "Text", falls dir das eher zusagen sollte...

_________________
Hasta La Victoria Siempre
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Fr 07.11.03 16:38 
Terra23 hat folgendes geschrieben:
ComboBox kennt IMHO auch die Eigenschaft "Text"
Die kann er aber nur ändern wenn die ComboBox nicht csDropDownList ist, da der Text ja nur auf das ausgewählte Item bezogen ist und demnach nicht frei geändert werden darf/soll.

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
Terra23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Sa 08.11.03 00:09 
... sorry, das hatte ich irgendwie vorausgesetzt.. :-)

_________________
Hasta La Victoria Siempre