Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi ComboBox und Button (https://www.delphipraxis.net/57701-combobox-und-button.html)

Pump3r 25. Nov 2005 11:35


ComboBox und Button
 
Hi, ich hab ne ComboBox mit 4 einträgen, die immer gleich sind.
Und ich hab nen Button, jetzt würd ich gern für jeden der 4 Einträge ne Aktion zuweisen, die ich mit dem Button auslöse.

Wie mach ich das?

Gruß Pump3r

Aenogym 25. Nov 2005 11:42

Re: ComboBox und Button
 
hi,

Delphi-Quellcode:
procedure TForm1.Button1CLick(Sender. TObjecT);
begin
  case comboBox1.itemIndex of
    0: {aktion bei erstem eintrag};
    1: {aktion bei zweitem eintrag};
    2: {aktion bei dritten eintrag};
    3: {aktion bei viertem eintrag};
  end;
end;
ist simpel, oder? ;)

aenogym

Pump3r 25. Nov 2005 11:47

Re: ComboBox und Button
 
ohhja!! :>

dankeschön


gruß Pump3r :-D


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:47 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