From: "Eli Golovinsky" <gooli@tuzig.com>
Michael Hipp wrote:> This whole subject is a bit of a sore spot right now. I just finished the
> layout of a panel with some 43 controls on it grouped by 8 static boxes. i
> have easily 2 full working days into getting it to layout correctly.
> Sizers inside of sizers inside of sizers. And I cringe at the thought of
> ever having to modify that code. (I think I'd sooner tackle some Z80 code
> I wrote 20 years ago than modify that panel.)Maybe I'm missing something, but I really don't understand the merit of
writing layouts using bare code. An imperative language is not a very good
way to describe UI design. I've been working with complex design with lots
of controls and I've been doing it with XRCed for quite a while now. It
takes a sort of middle road between coding the layouts manually and using a
UI designer, and because it doesn't mess with the XRC format too much you
can even tweak it manually. I still use bare code for some very dynamic UI's
(etc. when the number of controls is determined at runtime), but I still
usually design the basic layout in XRC and leave an empty panel to fill with
code-created controls later.I've had some experience with VB, .NET and Java, and the wx combined with
XRCed is just simpler, faster and more maintainable.
Robin and me have also recently added some code to XRCed that auto-generates
the slightly ugly code that loads the XRC file and creates the objects.You really should try it.
Thanks. I will indeed look into XRC. I haven't in the past because I worried about overhead/inefficiency and issues like repeatability and flexibility. Plus I find XML about as easy to read as C++. But I can certainly get over it if the payoff is big enough.
Thanks,
Michael