Hey Adrian,

2009/5/16 Adrian Sutherland <[email protected]>:
> The code implementing this in WTreeView.C uses a templateWidget and
> CSS rule for the Column 0 width. Other columns are resized directly.
>
> I am not sure why it does this?

The reason is complex: its size is implicit based on the width of the
table and the width of the other columns...

> Anyway - somehow it does not seem to work for me - the column is
> always changes with the size of the table.

... which indeed leads to this default behavior. But, the latest git
does make it possible to set the column 0 width explicitly in all
situations.

> More generally - this function used resize etc. In reality should we
> all be using CSS for positioning in Witty rather than layouts - what
> do you folks advise?

This not a straight forward decision: depending on the situation, you
should use layout managers only when they are really needed to
implement a particular layout.

For example, if you have a CSS guy available to you, then you should
try to stick with CSS. Also, if you are concerned with accessibility,
you best stick with CSS. In general, if you can easily do it using
CSS, it is probably a good idea to stick with CSS.

Yet, you will notice that some things are simply not possible with
CSS: mainly when you want to have "fluid" layouts which do something
intelligent w.r.t. height. Then, a layout manager is your only option
as the CSS spec completely foobars height properties of HTML elements.

Internally, Wt follows these rules of thumbs: that's why you will see
that layout managers are used sparingly.

Layout managers are still relatively young (and more complex than we
would have wished), and there are still quite some bugs and/or
gotcha's -- which is clear from the other thread on this topic. If it
works, they work well, but it's not trivial to get there.

> Also the function setColumn1Fixed (which perhaps should be called
> setColumn0Fixed?) only has the logic for setting it true from false -
> it can't ever be made false after being true. If this is a real
> restrictions perhaps it would be better to have no argument at all to
> make it clear that there is a set function but no unset?

You are right (both about the name and its true->false logic). I will
add in a note that this direction does not yet work. But we might
implement it some day so I would leave the API unchanged.

Regards,
koen

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to