wxPython: Should you use a master sizer object?

J

John Salerno

Sorry for posting here again. I tried the wxPython list but I'm not sure
I'm sending to the right email address! It bounced back. Besides, your
opinions are too good to pass up. ;)

My question was:

I was wondering, is it recommended to always have a top-level sizer in
which you place all other sizers, or is it acceptable to have mulitple
sizers that are not grouped together?
 
S

Steve Holden

John said:
Sorry for posting here again. I tried the wxPython list but I'm not sure
I'm sending to the right email address! It bounced back. Besides, your
opinions are too good to pass up. ;)

My question was:

I was wondering, is it recommended to always have a top-level sizer in
which you place all other sizers, or is it acceptable to have mulitple
sizers that are not grouped together?

You should definitely create a master sizer, and then add sub-sizers to it.

regards
Steve
 
J

John Salerno

Steve said:
You should definitely create a master sizer, and then add sub-sizers to it.

Thanks. Also, I just found out that a Frame can't have more than one
sizer in it, meaning if you need multiple sizers you *have* to create a
master sizer first to nest the others. Now it's just a matter of
figuring out *how* to use them! I don't want to fall into the trap of
using them the way you can use the <table> element to lay out a form in
HTML...
 
S

Steve Holden

John said:
Thanks. Also, I just found out that a Frame can't have more than one
sizer in it, meaning if you need multiple sizers you *have* to create a
master sizer first to nest the others. Now it's just a matter of
figuring out *how* to use them! I don't want to fall into the trap of
using them the way you can use the <table> element to lay out a form in
HTML...

There doesn't seem to be any really usable material to help beginners. A
recursive design approach seems best, breaking down each grouping, but I
have sometimes found it difficult to adapt a design to changes.

Although I'm a big fan of open source I must confess that to solve this
problem I eventually bought a copy of wxDesigner, which while not
perfect does help quite a lot, and allows cut/copy and paste of design
elements.

regards
Steve
 
J

John Salerno

Steve said:
There doesn't seem to be any really usable material to help beginners. A
recursive design approach seems best, breaking down each grouping, but I
have sometimes found it difficult to adapt a design to changes.

Although I'm a big fan of open source I must confess that to solve this
problem I eventually bought a copy of wxDesigner, which while not
perfect does help quite a lot, and allows cut/copy and paste of design
elements.

Yeah, it would be nice to use something like wxDesigner eventually, but
right now I'd like to learn how to write it all by hand, so I can know
what's going on.

There are a couple of screencasts about using sizers with Dabo that are
helpful, even though it's specific to that designer. It still shows how
to layout nested sizers, for example.
 
M

Morpheus

IIRC the wx dox contain stuff about sizers too. It's definitly worth to get
into this stuff. Once you are used to sizers, you don't want to miss them
anymore.

HTH
Morpheus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top