I have some problems. Look:
First I create window
Then I create: 50 buttons (5X10),no space between buttons, window
is the parent for all buttons
For each other button: first click creates Rectangle (PtRect),
so I can create 50 rectangles (one rectangle
for one button), button is the parent for
Now, I want to delete created rectangles by second click. To destroy
rectangle widget I have to know pointer to rectangle. But I can’t get
that pointer, becouse button can’t give me that pointer (when using
PtWidgetChildFront etc). Button can be parent (when creating rectangle) but realy parent is cointainer object above button widget. So parent for rectangle is window, parent for button.
So I can’t delete created rectangle.
I think use container class for each other button it’s good idea.
I tested PtPane. PtPane object was parent for button, and rectangle.
But then I can’t create buttons witout some space between buttons.
Any suggestions? If you can, please post some code configuring container
object, or slimply explain how to do it.