Autor Beitrag
MKSlayer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

SUse / WinXp / Win 2003 server
Turbo Delphi / Borland Builder 4
BeitragVerfasst: Mo 07.07.08 07:18 
wenn ich einen Button Betätige soll ein eitrag in der Combox ausgewählt (nicht erstellt, ComboBox ist schon gefüllt) werden,..

wie kann ich das umsetzten

Schon mal besten Dank im voraus

Mfg MKslayr


Moderiert von user profile iconGausi: Topic aus Sonstiges (Delphi) verschoben am Mo 07.07.2008 um 09:18
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Mo 07.07.08 07:56 
Wenn du den genauen Text weißt kannst du es so machen:

ausblenden Delphi-Quelltext
1:
ComboBox1.ItemIndex := ComboBox1.Items.IndexOf('Dein Eintrag');					


Ansonsten direkt über den ItemIndex.
Hinweis: Der erste Wert hat den Index 0!

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

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce
MKSlayer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 62

SUse / WinXp / Win 2003 server
Turbo Delphi / Borland Builder 4
BeitragVerfasst: Mo 07.07.08 08:09 
so ich weiß wie der eintrag heißt

aber es funktioniert nicht über Text



ausblenden Delphi-Quelltext
1:
ComboBox1.Text:=Form1.ZQuery1.FieldByName('Schriftart').AsString;					
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Mo 07.07.08 08:12 
Probiers mal so:

ausblenden Delphi-Quelltext
1:
ComboBox1.ItemIndex := ComboBox1.Items.IndexOf(Form1.ZQuery1.FieldByName('Schriftart').AsString);					

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce