ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxPython-users
wxPython-users
Re: [wxPython-users] Sizers API
by Patrick K. O'Brien other posts by this author
Mar 24 2003 8:29PM messages near this date
Re: [wxPython-users] Sizers API | Re: [wxPython-users] Sizers API
Donnal Walter <donnalcwalter@[...].com>  writes:

>  Sizers are extremely powerful, but it is common knowledge that they
>  can be equally confusing. IMHO there are two reasons for this
>  confusion. The first reason is that the arguments are far from
>  intuitive and perhaps Chris's API would help with this. (I have
>  taken a similar approach and implemented three keyword arguments:
>  resize, margin, and align.)

Yeah, border is an unfortunate choice of keywords, in that what a
sizer calls a border is really a margin of empty space, not a visible
line, which is what most would think of as a border.  Cascading style
sheets have margin (space around an element), border (visible line of
a certain color, style and width) and padding (space between the
element and its border).  Worse, the border parameter is really just
the border width.  The actual border depends on what type of border is
specified in the flags parameter, itself a mishmash of border and
resize behavior configuration options.

More unfortunate is the option parameter, which only applies to
BoxSizer, but is defined in the Sizer parent class, and isn't easily
ignored because it is the second parameter and comes before the flag
and border parameters.  And the wxWindows docs don't call it option,
they call it proportion, which is a bit more descriptive since it
determines the proportion of space allocated to the item in relation
to the space requested by all items in that particular BoxSizer.

I'm starting to think the entire sizer API is ripe for an overhaul.
If ever there was a place to deviate from wxWindows, surely this is a
pretty good one.

>  But the second source of confusion is that if one uses nested
>  windows (panels) and nested sizers to any degree, one ends up with
>  two entirely different containment hierarchies. The way I have
>  handled this is to build sizers into my panels, so that adding a
>  component to the panel automatically adds it to the sizer. No muss,
>  no fuss.

I think this is worth discussing as well.  Robin?  Any thoughts?

-- 
Patrick K. O'Brien
Orbtech      http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@[...].org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
Thread:
Patrick K. O'Brien
Chuck Esterbrook
Robin Dunn
Alberto Griggio
Bill Anderson
Patrick K. O'Brien
Donnal Walter
Chris Barker
Patrick K. O'Brien
Donnal Walter
Patrick K. O'Brien
David C. Fox
Patrick K. O'Brien
Robin Dunn
Donnal Walter
Patrick K. O'Brien

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved