Ereignisse zu dynamische Buttons hinzufügen.
-
Ich erstelle dynamische Buttons so:
AnsiString Buffer; int bis=1; for (int a=0;a < bis;a++) { newButton[a]= new TButton(this); newButton[a]->Parent = Form1; newButton[a]->Name = "btn_" + IntToStr(a); newButton[a]->Top =x; newButton[a]->Left = x; newButton[a]->Visible = true; }Aber ich will den Button natürlich noch Ereignisse (OnClick) hinzufügen, aber ich weiß nicht wie man das macht. Wie macht man dies?
-
Evtl. das hier ?
http://www.c-plusplus.net/forum/viewtopic-var-t-is-39206.html
-
Ok, Danke.
Ich dachte nicht, dass es doch so relativ einfach ist.