|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Nov 2002
Messaggi: 6290
|
[C++] Problema con bottoni
Sto usando C++ Builder 6 per un mio progetto. Ho implementato un array di puntatori a bottone in questo modo:
Codice:
TButton**array_bottoni= new TButton*[numerocellelato*numerocellelato];
for(int i=0; i<numerocellelato*numerocellelato;i++)
{ array_bottoni[i]= new TButton(Form1);
}
// questo lo faccio per ogni bottone dell'array
Form1->InsertComponent(array_bottoni[(i*numerocellelato)+s]);
array_bottoni[(i*numerocellelato)+s]->Left=x;
x=larghezza_bottone+larghezza_muro+x;
array_bottoni[(i*numerocellelato)+s]->Top=y;
array_bottoni[i]->Height=larghezza_bottone;
array_bottoni[i]->Width=larghezza_bottone;
array_bottoni[(i*numerocellelato)+s]->Visible=true;
Il codice non dà errori, probabilmente c'e' solo da settare un parametro dei bottoni, ma non so quale. |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 11:34.



















