Event von auf runtime gemachte shapes
-
Hi,
Ich hab volgendes problem. Auf runtime mach ich 1000 shapes an. Ich moechte hier ein OnMouseDown event fur programmieren, aber hab keine ahnung wie ich vorgehen soll, weil die shapes erst auf runtime gemacht werden.
TShape *a[10][10][10]; int left = 200, top = 40; for (int z = 0; z < 10; z++) { left = left - 10; top = top + 10; for (int y = 0; y < 10; y++) { for (int x = 0; x < 10; x++) { a[x][y][z] = new TShape(Form1); a[x][y][z]->Parent = Panel2; a[x][y][z]->Left = ((x * 30) + left); a[x][y][z]->Top = ((y* 30) + top); a[x][y][z]->Height = 17; a[x][y][z]->Width = 17; a[x][y][z]->Shape = stCircle; } } }
-