[Q] wxPython - layout & placement

Robin Dunn robin at stop.spam.alldunn.com
Fri Jul 26 17:13:25 EDT 2002


"Rolf Marvin Bøe Lindgren" <roffe at aqualene.uio.no> wrote in message
news:lbzznwnpu98.fsf at aqualene.uio.no...
> I'm trying to place a button in a dialog window.  this works:
>
>
> but I'd like to use layout controls.  I've figured out how to do it
> with wxPanel, but wxDialog doesn't seem to work the same way.

Automatic layout happens during the default EVT_SIZE handler for windows,
but on Windows the wxDialog does not get a size event when shown like
wxFrames do.  So if there is no size event then there will be no autolayout.
You can usually get around this by calling self.Layout() at the end of your
dialog's __init__.


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







More information about the Python-list mailing list