Well, whether they should or not, this newbie is playing with sizers.
I'm running wxPython 2.4.0 and Python 2.2.2 on Win32.
I am trying to build a button bar at the bottom of a frame. I want the
buttons to resize, so a conventional toolbar is out, I think. After
looking over the demos that came with wxPython, I decided to implement
my button bar inside a wxSashLayoutWindow. Feel free to steer me in a
different direction, if it's easier!
Code attached. It runs. The buttons are in the sash where they
belong. But the wxBoxSizer doesn't work! All the buttons governed by
the sizer are at their default sizes and are drawn overlapping, at
(0,0). I can see that the sizers for each individual button are
contained within the wxBoxSizer that I defined. But the GetSize()
method for my sizer remains stubbornly at (0,0), even though it
contains those three buttons.
Did I leave out a step somewhere?
By the way, thanks to everyone who helped with the "Hello, world"
crash. I've mostly separated myself from IDLE, and I'm passing
interpreted code straight to python.exe or pythonw.exe. I'm also
tackling Scintilla.
Button bar.py (1.6 KB)
···
--
John J. Ladasky Jr., Ph.D.
Department of Biology
Johns Hopkins University
Baltimore MD 21218
USA
Earth