Hallo alle zusammen,
ich habe bei mir ein ernstes Problem.
Ich habe 2 Formulare, das 1. Willkommensscreen durch einen Button gelangt man auf das 2. Spielebene.
In dem 2. Formular hab ich 26 Buttons, so nun will ich diese 26 Buttons einfach einem Array mit Buttons zuweisen damit ich sie nachher mittels einer scheife durchgehen kann (ich will sie wieder sichtbar machen ist jetzt aber nicht notwendig das ihr das wisst!!)
private
TButton *btn[25];
so nun wo sollte ich diese Zuweisung hinschreiben oder muss ich vorher noch was machen?
btn[0]=btn_a;
btn[1]=btn_b;
btn[2]=btn_c;
btn[3]=btn_d;
btn[4]=btn_e;
btn[5]=btn_f;
btn[6]=btn_g;
btn[7]=btn_h;
btn[8]=btn_i;
btn[9]=btn_j;
btn[10]=btn_k;
btn[11]=btn_l;
btn[12]=btn_m;
btn[13]=btn_n;
btn[14]=btn_o;
btn[15]=btn_p;
btn[16]=btn_q;
btn[17]=btn_r;
btn[18]=btn_s;
btn[19]=btn_t;
btn[20]=btn_u;
btn[21]=btn_v;
btn[22]=btn_w;
btn[23]=btn_x;
btn[24]=btn_y;
btn[25]=btn_z;
ich habe bei mir ein ernstes Problem.
Ich habe 2 Formulare, das 1. Willkommensscreen durch einen Button gelangt man auf das 2. Spielebene.
In dem 2. Formular hab ich 26 Buttons, so nun will ich diese 26 Buttons einfach einem Array mit Buttons zuweisen damit ich sie nachher mittels einer scheife durchgehen kann (ich will sie wieder sichtbar machen ist jetzt aber nicht notwendig das ihr das wisst!!)
private
TButton *btn[25];
so nun wo sollte ich diese Zuweisung hinschreiben oder muss ich vorher noch was machen?
btn[0]=btn_a;
btn[1]=btn_b;
btn[2]=btn_c;
btn[3]=btn_d;
btn[4]=btn_e;
btn[5]=btn_f;
btn[6]=btn_g;
btn[7]=btn_h;
btn[8]=btn_i;
btn[9]=btn_j;
btn[10]=btn_k;
btn[11]=btn_l;
btn[12]=btn_m;
btn[13]=btn_n;
btn[14]=btn_o;
btn[15]=btn_p;
btn[16]=btn_q;
btn[17]=btn_r;
btn[18]=btn_s;
btn[19]=btn_t;
btn[20]=btn_u;
btn[21]=btn_v;
btn[22]=btn_w;
btn[23]=btn_x;
btn[24]=btn_y;
btn[25]=btn_z;
Comment