Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi ComboBox die eine DropDownList ist, mit Wert vorbelegen (https://www.delphipraxis.net/82445-combobox-die-eine-dropdownlist-ist-mit-wert-vorbelegen.html)

HolgerCW 13. Dez 2006 11:45


ComboBox die eine DropDownList ist, mit Wert vorbelegen
 
Hallo zusammen,

wenn ich nicht drop down list auswähle kann ich so vorbelegen:
Delphi-Quellcode:
ComboBoxJahr.Text := inttostr(Yearof(Date));
Wie geht das wenn ich DropDownList ausgeählt habe ?

Gruss

Holger

marabu 13. Dez 2006 12:26

Re: ComboBox die eine DropDownList ist, mit Wert vorbelegen
 
Delphi-Quellcode:
with ComboBox do
  ItemIndex := Items.IndexOf(IntToStr(Yearof(Date)));

HolgerCW 13. Dez 2006 12:54

Re: ComboBox die eine DropDownList ist, mit Wert vorbelegen
 
Vielen Dank,

so hat es geklappt.

Gruss

Holger


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:02 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz