Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Brauche Dringend Hilfe bei : Nicht Alle Buttons Anklickbar! (https://www.delphipraxis.net/94233-brauche-dringend-hilfe-bei-nicht-alle-buttons-anklickbar.html)

Nuclear-Ping 22. Jun 2007 20:25

Re: Brauche Dringend Hilfe bei : Nicht Alle Buttons Anklickb
 
Für's nächste mal kannst du die Buttons zur Laufzeit erstellen.
Delphi-Quellcode:
var
  MyButtons: Array[0..143] of TBitBtn;

{...}
  for i := 0 to 143 do
    begin
      MyButtons[i] := TBitBtn.Create (Self);
      MyButtons[i].Tag := i;
      MyButtons[i].OnClick := MyButtonClickEventHandler;
    end;
{...}
In dem Eventhandler kannst du dann per Typecast "(Sender as TBitBtn).Tag" herausfinden, welcher Button geklickt wurde und entsprechend reagieren. ;)


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:06 Uhr.
Seite 2 von 2     12   

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