[wx-dev] Ideas for Future wxWidgets

Jorgen Bodde jorgen.maillist at gmail.com
Fri Jun 20 07:02:24 PDT 2008


Hi Julian,

> Hm, I think that would be pretty confusing if settings deep in the hierarchy
> overrode settings higher up. I can't imagine trying to visualise and debug
> layouts like that.

Well it is still odd that you can set a EXPAND=1 or GROW=1 and nothing
grows actually because one of the sizers above does not have that flag
set (yet) to fully expand. Isn't it an idea to make them grow / expand
by default? I mean the sizers, if the controls inside do not use this
flag nothing is visible to the user, but it might be more consistent
and solves the propagation problem.

> One would be completely bonkers (or a genius or a masochist) to try to write
> complex sizer layouts by hand. That's what GUI layout tools are for.

I partially agree, GUI layouts are nice if:
1. There are good free alternatives. DialogBlocks and wxDesigner are
great but not free. The number of layout designers that are really
good with XRC only (because wxWidgets is no longer just C++) are
actually scarce
2. Most dialogs are not complex (10 elements) which makes them just
too hard to write by hand, and too simple to buy a GUI designer for or
take up the effort to start a project for it.

> I'm not sure this really addresses the problem - a complex layout is a
> complex layout, and IMO the only reasonable way to manage the complexity is

Well my point is that the average user still does not grasps the
concept of sizers. The wxForum are full of people that still use the
X,Y coordinate system, heck they even want controls to overlap! I am
very grateful to use wxPython at work now, and with the lack of a good
GUI designer for wxPython I wrote the sizers by hand. Although I have
been with wxWidgets for a long while, I still think they are too
complex and have too many properties. One of the things was the
propagating GROW / EXPAND which sent me in a trial and error state to
see if the sizers and flags actually did what I wanted them to do.
That is why I suggested an intermediate solution that people can use
to think liniear, and not in sizer blocks.

> than XRC because the structure is more hidden. I may be wrong of course, and
> if there's an alternative people feel happier with then fine, so long as it
> doesn't drain wx-resources.

Well excuse me :-) It was only an idea, nothing else. I wasn't
enforcing this on anybody. At least I didn't used the words this
'must' be in the next version of someone 'has' to make it. Just
sharing thoughts ;-)

> I'm sure there's scope for making sizers easier to specify, but I don't see
> much point in reinventing XRC. I don't want to even see textual sizer
> representations, I want to work with the GUI directly.

Ok, well that's a start. The problem with sticking too close to C++ is
that a lot of code needs to be written to achieve something simple,
using a mechanism that parses or can take implicit decisions, might be
easier. But I was by no means claiming that XRC needs to be
reinvented. I simply took a HTML'ish example because it is both
readable and parsable.

Since it is a long long away for wxTNG is being thought of, I just
wanted to brainstorm a bit, not critisize the sizer system as it is
now. I think wxWidgets is the best of what there is on the market, but
being the owner of the wxForum I am confronted with people who are
totally new, and actual feel pain if they write in the 3rd message of
a thread that wxWidgets is too complex and they are going to try
something else.

- Jorgen


More information about the wx-dev mailing list