Why can't we get rid of sizers?

Hello Alex & NG,

I think Nitro was proposing something much more than that ....

given a "static" layout, and for each statically placed
control a description of how it should behave (h/v growth,
h/v alignment, border,
etc.) could we *deduce* a tree of sizers that would allow
the desired behaviour.

Yeah, that was what I intended.

Wow, that really seems a piece of magic artificial intelligent sizer :slight_smile:

I know it might not be possible everywhere, but it should give some results in most cases which can then be fine tuned. It should be more like a layer on top of sizers instead of removing sizers themselves. With layer on top I don't mean only a layer that changes the API somewhat.

It's not clear to me if a sizer tree can only be deduced from properties specified for each control or if also some kind of "group properties" that affect mutiple controls at once have to be specified so that good choices for deducing the tree can be made.

I think one could think about this problem more globally than just thinking about sizers. Not sure how fruitful that really is and maybe it gets too abstract.
A somewhat advanced (read: perhaps not senseful) approach would be to incorporate user feedback into this later. You could for example track how many times a user had to scroll a text box. If the user has to do that excessively it seems to indicate that the text box should get more area so the user does not need to scroll that much anymore. Another example is if the user has to scroll a lot in a window, then the controls get rearranged so he sees them all at first glance. This could also be used to create a window with "most used" controls automatically so navigation is reduced to a minimum.
The aim here is to let the designer auto-arrange the gui so that the number of required user inputs which are not directly related to the thing the program should do itself (like entering text data in a report form) is minimized. This may be one weakness, also the visibility of a control has to be taken into account, not only input. Could be overcome by implicitly calculating which controls the user wants to see (position the control somewhere else, see if the user scrolls less) or by giving the user a chance to click on all controls he wants to have visible.
Not sure how viable this really is, but it would allow for fast-(== easy?)-to-use GUIs imo (independent of what the programmer thinks is good).

···

Am Wed, 24 May 2006 17:10:38 +0200 hat Gavana, Andrea <gavana@kpo.kz> geschrieben: