Autor Beitrag
Josef-B
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 293

2003 Server, Win7, Win8
Delphi 2010 Pro, Firebird 2.5
BeitragVerfasst: So 23.01.05 22:14 
Wie kann ich in einer dblookuplistbox den ersten Satz nach OnEnter auswählen.

Mal einfach gesagt. Ich möchte, dass der erste Datensatz gleich 'blau' markiert ist und somit auch dblookuplistbox.keyvalue einen Wert hat.

Danke Josef


Zuletzt bearbeitet von Josef-B am So 23.01.05 22:35, insgesamt 1-mal bearbeitet
joje
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25

win xp, linux suse 9.1

BeitragVerfasst: So 23.01.05 22:22 
ich weiß ja nicht, gehts vielleicht mit setfocus?
habe von den dingern keine ahnung, aber eigentlich müsste das doch klappen
Josef-B Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 293

2003 Server, Win7, Win8
Delphi 2010 Pro, Firebird 2.5
BeitragVerfasst: So 23.01.05 22:35 
Hab ich auch gedacht, aber mit setfocus, ist noch kein Satz markiert.
joje
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25

win xp, linux suse 9.1

BeitragVerfasst: So 23.01.05 22:55 
mit Listbox1.Selected[0] := true; ??? also mehr fällt mir dazu nicht ein, aber bei mir hatta da immer ne fehlermeldung gehabt
Josef-B Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 293

2003 Server, Win7, Win8
Delphi 2010 Pro, Firebird 2.5
BeitragVerfasst: Mo 24.01.05 12:24 
Ne, das geht nicht

auch selecteditem[0] := true geht nicht, gibts nicht.
neojones
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1206
Erhaltene Danke: 1



BeitragVerfasst: Mo 24.01.05 13:07 
Die Tabelle, in die Dein DBLookUpComboBox schreibt gibt vor, welcher Datensatz ausgewählt wird, schließlich sieht er ja anhand dieses Feldes nach (LOOKUP) welcher Wert markiert werden soll.

Also solltest in der Tabelle einfach das Schlüsselfeld entsprechend setzen.

_________________
Ha! Es compiliert! Wir können ausliefern!
Josef-B Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 293

2003 Server, Win7, Win8
Delphi 2010 Pro, Firebird 2.5
BeitragVerfasst: Mo 24.01.05 14:15 
Neojones: Das Problem ist, dass in der Listbox nur ein Teil der gesamten Tabelle angezeigt wird:

Der Primary key ist in dem Fall ein anderes Feld.

ausblenden Delphi-Quelltext
1:
2:
3:
SQL.Text:= 'select * from Artikel_Gruppe_2 ' +
    'where NR_Art_Gruppe_1 = ' +
    dblookuplistbox1.KeyValue + ' order by Nr_Art_Gruppe_2';
OlliWausD
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 212

Win 2000/XP
Delphi 5 Professional - Interbase/Firebird
BeitragVerfasst: Di 25.01.05 11:59 
hm......

also ich hab mich jetzt mal hingesetzt und mal weng mit der Komponente getestet, und ich muss definitiv sagen: Ich kriegs auch nicht raus !

nehm am besten ne standard-Listbox und füll sie von hand. Geschwindigkeitstechnisch gesehn, macht das auch nichts aus, es sei denn, du hast in der Listbox n paar Tausend DS.

mfg

OlliW

_________________
Take it easy
DeePee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Fr 15.04.05 22:12 
user profile iconneojones hat folgendes geschrieben:
Die Tabelle, in die Dein DBLookUpComboBox schreibt gibt vor, welcher Datensatz ausgewählt wird, schließlich sieht er ja anhand dieses Feldes nach (LOOKUP) welcher Wert markiert werden soll.

Also solltest in der Tabelle einfach das Schlüsselfeld entsprechend setzen.



Hallo!

Ich hab das gleiche Problem und verstehe nicht ganz was du uns damit sagen willst?Mein Dropdown (DBLookupComboBox) wird schon mit Einträgen gefüllt, nur möchte ich direkt von Anfang an eines dieser Felder selektieren lassen, da das erste feld vor dem ersten Auswählen KOMISCHERWEISE "leer" ist. (Nein, in der DB ist kein leeres Feld!)

:D
Victorianus
Hält's aus hier
Beiträge: 1

Win XP

BeitragVerfasst: Mo 27.11.06 18:26 
Ich hab das gleiche Problem und keine Idee, wie ich es lösen könnte...



:(

_________________
Bald und du hast vergessen,
Bald und man hat dich vergessen.