|Multi line headers in table columns [message #901764]
||Tue, 14 August 2012 13:42
| Ken Lee
Registered: March 2012
Since RAP 1.5  it's possible to add line breaks to the header of a table column. The header is always center aligned in the vertical direction. Is it possible to align the header differently?|
The header cell containing the most line breaks gets the padding defined in the CSS file under TableColumn->padding. Other header cells containing less line breaks have a higher top padding value. However, I couldn't find out where the calculation is done in the RAP code. Can you give me a hint?
[Updated on: Tue, 14 August 2012 13:42]
Report message to a moderator
|Re: Multi line headers in table columns [message #902188 is a reply to message #901995]
||Thu, 16 August 2012 09:29
| Tim Buschtoens
Registered: July 2009
> If you have a header with 3 columns each containing a header text with
> 1, 2 or 3 lines respectively, the CSS property "top" for positioning of
> the header text has a different value for each case. That's why I
> guessed that the calculation of the position must be done somewhere,
> which finally results in a center alignment (the CSS property
> text-vertical-align is NOT used).
Yes, all HTML elements in RAP always get absolute css positions, the top
property is the result of all the aforementioned calculations.
> text is calculated?
That code is shared between many widgets, so it wouldn't be a good idea
to change that. If you want to change the default vertical alignment,
you could try to edit Table.appearance.js/Tree.appearance.js, which have
a "tree-column"/"table-column" map. There a line like
result.verticalChildrenAlign = "bottom";
*might* do what you want. I did not test it.
Professional services for RAP and RCP?
Powered by FUDForum
. Page generated in 0.02093 seconds