[wxPython] Bug: wxStaticBox just doesn't seem to show up

AARRRGGHHH!!! I can't believe I did that again (second time I've spent ages
on the same bloody thing). Any chance of adding this into the wxDialog
class so the two classes can be a little more interchangeable? Or maybe
just a big wxPython note in the wxDialog docs saying "NOTE: Sizers in
wxDialogs will _not_ work unless you explicitly call self.Layout() in your
initialiser"

Sigh. I'm getting feebleminded in my old age, need lots of crutches...
Thanks Robin,
Mike

···

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Saturday, November 04, 2000 1:08 PM
To: wxpython-users@lists.sourceforge.net
Subject: Re: [wxPython] Bug: wxStaticBox just doesn't seem to show up

self.SetSizer(outerSizer)
self.SetAutoLayout(true)
EVT_SIZE(self, self.OnSize)
def OnSize (self, event = None):
self.Layout ()

On wxMSW, the dialogs are fixed size and so they don't automatically get a
size event at the begining like wxFrames do, so Layout won't get called
unless yoiu force it in some way.

Adding a call to self.Layout() at the end of _buildPanel() does the trick.
I think changing the size of the dialog after the sizer has been set will do
it also.

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

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