Top level panel in any Window

Is there a way to set the size of a Window’s top level Panel without
changing the ClientSize of the containing Window ?

Isn't a Panel just a plain Window subclass with a few additions ?

Or, in other words, how can I defeat the top Panel’s
auto-resize-when-is-the-top-level feature ?

Or, is it simpler and clearer to just create a plain borderless

Window and treat it like a Panel ?

Thanks

Actually that is a feature of wx.Frame, to resize its child (if it has only one and there is no sizer) to fill the client area. It is done in the frame's default handler for EVT_SIZE, so you can override it by catching that event yourself and doing something different in your event handler. Or you can put the panel in a sizer that is assigned to the frame and let the sizer manage the layout of the panel.

···

On 8/6/10 2:22 PM, Ray Pasco wrote:

  Is there a way to set the size of a Window's top level Panel without
changing the ClientSize of the containing Window ?

Isn't a Panel just a plain Window subclass with a few additions ? Or, in
other words, how can I defeat the top Panel's
auto-resize-when-is-the-top-level feature ?

--
Robin Dunn
Software Craftsman