ShapeCanvas Destruction?

Alex Zeiger wrote:

I instantiate a ShapeCanvas object when my program is initialized. Later, when I Destroy() the ShapeCanvas object it's removed from the frame. Yet, when I re-instantiate the exact same way as I did during initialization, it does not appear on screen.

Both methods use the same functions, in the same scope, so why is there a difference? How can I get the later instantiation to appear? Any help is greatly appreciated.

The frame will layout its children when it gets an EVT_SIZE event. So if you create a new ShapeCanvas but don't do anything to cause the default EVT_SIZE handler to be run then it will stay a very small size. When you create your new canvas, call frame.SendSizeEvent().

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

The frame will layout its children when it gets an EVT_SIZE event. So if you create a new ShapeCanvas but don't do anything to cause the default EVT_SIZE handler to be run then it will stay a very small size. When you create your new canvas, call frame.SendSizeEvent().

Ah! Of course! Thank you so much!