Dragging between Panels and Changing Parent.

Nyxter wrote:

I've created my own subclass of wx.Panels, and implemented drag and
drop, so that if I create one (say Y) detects which panel it lands
on(say Z).

However I then want to add the panel(Y) into the the panel (Z) rather
than the whole frame which its parent currently is.

Is there a way of doing this?

Zowie. There are a lot of data structures to update to make that
happen. Windows has its own concepts of window parentage and ownership,
completely separate from the wxWidgets object and sizer hierarchy.

Ive looked into changing 'Parent' but the only way this can happen is
in the __init__ method, and obviously cant just create a new object.

You can change the parent: the wx.Window class has a Reparent method
that should handle most of this for you.

ยทยทยท

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.