Since I have not worked with sash windows very much I can't explain
everything or offer much detailed advice, but your problem
interested me, so I took a stab at it. Basically I just put the
buttons on a panel before placing them in the sash window, and it
seems to work.
Yes, I've done the same, and my problem is solved. I don't understand
why nesting a panel inside the sash window is necessary, though, since
both types of objects inherit the SetSizer() method.
I am also a strong advocate of a more
object-oriented approach to life, so I put the button panel code in
its own class.
Although I am rather new to OOP, I was planning to do the same, once I
had debugged my problem.
Hope this helps,
Indeed it did!
···
From: Donnal Walter <donnalcwalter@yahoo.com>
Date: Saturday, April 12, 2003 8:40 am
Subject: Re: [wxPython-users] Should newbies play with sizers?
Donnal Walter
Arkansas Children's Hospital
--
John J. Ladasky Jr., Ph.D.
Department of Biology
Johns Hopkins University
Baltimore MD 21218
USA
Earth
From: Donnal Walter <donnalcwalter@yahoo.com>
Date: Saturday, April 12, 2003 8:40 am
Subject: Re: [wxPython-users] Should newbies play with sizers?
Since I have not worked with sash windows very much I can't explain
everything or offer much detailed advice, but your problem
interested me, so I took a stab at it. Basically I just put the
buttons on a panel before placing them in the sash window, and it
seems to work.
Yes, I've done the same, and my problem is solved. I don't understand why nesting a panel inside the sash window is necessary, though, since both types of objects inherit the SetSizer() method.
Sash windows predate sizers and I think they were meant to implement a unique form of layout that was difficult to do with constraints. Because of that their default EVT_SIZE handler doesn't check if there is a sizer but just runs the sash layout algorithm. You can override that by having your own EVT_SIZE on the sash window that calls the sizer's Layout, but it's probably just as easy to just put things on a panel as you have done already.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!