[PEAK] A layout and styling framework for UI components

Phillip J. Eby pje at telecommunity.com
Sat Dec 8 16:13:46 EST 2007


At 08:19 PM 12/8/2007 +0200, =?ISO-8859-5?B?vdja3tvQ2Q==?= wrote:
> > >Simple task to align text in label
> > >and edit control is impossible to do unless baseline property is
> > >handled.
> >
> > Yep, that will be handled by rendering the pair from a single Field
> > object.  Also, when we (eventually) have Lout-style layout formulas,
> > baseline alignment will probably be the default way of horizontally
> > aligning widgets.
>
>OK, not so simple task: align group of pairs (label control) as single
>horizontal line.
>If any control is multi line then baseline for it's first line is used.
>
>For bonus points: possibility to switch this as vertical layout pairs
>label over control.
>
>I tested simple sizer based implementation, but no common baseline alas.

I'm not an expert on this, but my understanding is that Bryan Stearns 
at OSAF has developed a wx sizer that performs baseline alignment of 
some variety, and solves some of the common cases.  I don't know what 
it does with multiline controls, but I do know that one of the goals 
for the design was to support expanding labels for i18n where 
translated labels may be of a different size.

It may be that baseline information needs to be stylesheet based as 
well, such that there are rules for calculating (or looking up, or 
hardcoding) baseline offsets.  The rendering framework I'm writing 
allows such information to propagate up the widget assembly as well 
as having style information propagate down.




More information about the PEAK mailing list