[wxPython] layout managers work in wxDialog?

You Rock!

  Thanks a lot. I thought I had lost my head. The combination of the
SetAutoLayout() and the self.Layout() did the trick.

Thanks a bunch.

Seth.

···

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Wednesday, February 07, 2001 4:22 PM
To: wxpython-users@lists.sourceforge.net
Subject: Re: [wxPython] layout managers work in wxDialog?

  I'm having trouble using a layout manager with wxDialog. If I add a

panel

to a wxDialog, and then set constraints on the panel, the constraints are
never used when the dialog is displayed. I was wondering if I was doing
something wrong or if wxDialog just isn't supposed to handle window

objects

with layout constraints.

First of all, you didn't call SetAutoLayout(true). Secondly, with dialogs
you don't need to have a wxPanel between it and the controls. Finally, on
MSW wxDialogs don't automatically get an extra size event after they are
created. Since auto layout happens in the default size event handler it
will never to the layout unless you force it. You can either call
self.Layout() or wait to set the size of the dialog until the end of
__init__.

Some combination of the above will fix it for you.

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

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users