![]() |
ComboBox Item-Zahl
Ich hab mal wieder eine kurze Frage:
Ich habe eine ComboBox mit über 100 Einträgen. Jetzt will ich die Nummer des Eintrages in einem EditFeld ausgeben. Nachdem es ja über 100 Einträge sind, wird mir der untenstehende Quellcode zu lang. Das geht doch bestimmt auch einfach oder?
Delphi-Quellcode:
begin
if ComboBox1.ItemIndex = 0 then begin Edit1.Text := '1'; end; if ComboBox1.ItemIndex = 1 then begin Edit1.Text := '2'; end; ... |
Re: ComboBox Item-Zahl
Delphi-Quellcode:
Edit1.Text := IntToStr(combobox1.itemIndex);
|
Re: ComboBox Item-Zahl
Optimal.
DANKE. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:39 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz