Einzelnen Beitrag anzeigen

Niko

Registriert seit: 23. Jun 2003
416 Beiträge
 
Delphi 2006 Professional
 
#2

Re: Zwei Komboboxen synchronisieren

  Alt 10. Jun 2005, 13:56
Hi,

Delphi-Quellcode:
if ComboBox2.itemIndex <> ComboBox1.itemIndex then
  ComboBox2.ItemIndex := ComboBox1.ItemIndex;
in's OnChange von ComboBox1 bzw. entsprechend in ComboBox2.

Grüße,

Niko

[EDIT] Noch eine if-Abfrage eingefügt, damit's bei zwei Comboboxen nicht zu einer Endlosschleife kommt. [/EDIT]
"Electricity is actually made up of extremely tiny particles called electrons, that you cannot see with the naked eye unless you have been drinking." (Dave Barry)
  Mit Zitat antworten Zitat