Bonjour !!![]()
je voulais vous demander si c'est possible de creeer un Boutton dynamiqement en lui assignant l'evenement OnClick :
voici ce que j'ai fait
Priviet vsem !!!
![]()
Mne Xotchetsa Cozdat Prostaya Knopka Dinamitcheski i
ee pisat Obrabotchik Cobitii OnClick no ne znayu esli etogo mojno delat :
vot i moy kod
mais ca ne marche pas
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 TForm1 *Form1; void TForm1::ecrire() {Edit1->Text == "Saidus";} //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { TButton *b; b = new TButton(this); b->Parent = this; b->Left = 272; b->Top = 72; b->Caption= "Saidus"; // b->Click(); b->OnClick = ecrire(); // ecrire() est une fonction ... (voir debut du code) }
merci d'avance ..
Partager