Hey,
I'm creating a very simple program that will allow you to manipulate shapes; each shape has the same mousedown properties as every other shape.
What i want to do next is to use a settings dialogue box to set the number of shapes created when the form is run, bearing in mind that each created shape must have the same functionality as every other shape.
Heres a snippet of code inside a buttons click event, all this does is create the shape and assign it to a group box, there's other code to position the new shape next to existing shapes which is unnecessary here i think:
TShape* shpNew;
shape = new TShape(this);
shape->Parent = mainGrp;
//set all the appearance properties
shape->Shape = stRectangle;
shape->Brush->Color = clRed;
shape->Width = 33;
shape->Height = 33;
shape->Left = 10;
shape->Top = 10;
I'm not sure how i would go about creating multiple shapes on startup, let alone creating them based on a pre-set number.
The idea is that I won't need a button on the form to add more shapes, I can just use a default number of shapes to begin with and then change that number through a dialogue window.
help would be much appreciated, thanks in advance.
Steve.
I'm creating a very simple program that will allow you to manipulate shapes; each shape has the same mousedown properties as every other shape.
What i want to do next is to use a settings dialogue box to set the number of shapes created when the form is run, bearing in mind that each created shape must have the same functionality as every other shape.
Heres a snippet of code inside a buttons click event, all this does is create the shape and assign it to a group box, there's other code to position the new shape next to existing shapes which is unnecessary here i think:
TShape* shpNew;
shape = new TShape(this);
shape->Parent = mainGrp;
//set all the appearance properties
shape->Shape = stRectangle;
shape->Brush->Color = clRed;
shape->Width = 33;
shape->Height = 33;
shape->Left = 10;
shape->Top = 10;
I'm not sure how i would go about creating multiple shapes on startup, let alone creating them based on a pre-set number.
The idea is that I won't need a button on the form to add more shapes, I can just use a default number of shapes to begin with and then change that number through a dialogue window.
help would be much appreciated, thanks in advance.
Steve.