Hey Rogier,

2009/5/15 Rogier Schouten <[email protected]>:
> I’ve tried WBoxLayouts, WBorderLayouts and WGridLayouts, read the manual ten
> times, played with Alignment flags, resize() and setMinimumSize(), and there
> is still something I’m not getting about layouts.

Wt's layout managers definitely violate here the principle of least surprise !

> The code below produces the attached pictures in Firefox and IE. I have
> several questions:
>
> 1)       How can I make the YELLOW container stretch to fill its grid cell?
> According to the manual it should already, since I specified alignment=0 for
> GridLayout::addWidget(). However, it only stretches horizontally, not
> vertically.

We do not let the layout manager actively manage the height of widgets
for which a stretch factor of 0 is set. The reason is that the layout
manager would no longer be able to react to reductions in row height
because of widgets reduce their height (e.g. because some text was
changed). We could not discover a way how to achieve both (oh
wonderful world of CSS...).

The latest git allows you however to chose between either active row
reductions, or managed cell heights. Setting a special stretch factor
of -1 achieves the new behavior of getting the yellow container
stretch to fill its grid cell.

> 2)       How can I make IE take the minimum size of the WContainerWidgets
> into account? Currently it fits grid cells tightly arount the WTexts even
> though I specified a larget size for the container.

This was a bug in IE's min-width/max-width workaround methods (IE6
lacks support for this CSS property). This has been fixed in the
lastest git.

> 3)       Is there a way to specify grid row / column widths as a percentage
> of the browser window? Setting percentages in setMinimumSize() does not
> appear to have any effect.

This is undefined behavior as far as I understand CSS...

Regards,
koen

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to