views:

47

answers:

1

I am flailing about with wxWidgets, in particular, the wx.Sizer in wxPython. I have read the documents, I have a copy of wXPython in Action before me, and have set aside the problem to work on other things a better mental model of sizers hopefully gestated within my skull. None of this has worked.

I am not grokking, or even getting to the point where I can bang about usefully, how sizers work. In HTML, I could at least set a background color on some div or td, or call forth borders so I could see how things are laid out. Here, I have a grey expanse and no idea which of the nested static box sizers from which it originates. I am giving static box sizers after making a mess out of the grid bag sizers.

Either alternative would let me at least get a handle on how these work.

A: 

Although not an answer to your problem, a good way to get a handle on how sizers work is to install Code::Blocks and use the wxSmith plugin to design your interfaces (I believe it is bundled with Code::Blocks). Code::Blocks is available for all major platforms.

wxSmith gives you a real-time view of the sizers you are using by highlighting them with red borders.

As an extra benefit, wxSmith is great for generating GUI code for you instead of doing it by hand.

George Edison
This was harder to install than I liked, but once working, this looks like a good way to play around with sizers. The C++ness of it is a little weird, but I think I can translate it to Python.
MetaHyperBolic