Multi line headers in table columns [message #901764] |
Tue, 14 August 2012 13:42 |
Ken Lee Messages: 97 Registered: March 2012 |
Member |
|
|
Since RAP 1.5 [1] 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?
[1] http://www.eclipse.org/rap/noteworthy/1.5/
[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 Messages: 396 Registered: July 2009 |
Senior Member |
|
|
Hi!
> 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.
>
> Could you tell me in which Javascript file the position of the header
> 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.
Greetings,
Tim
--
Tim Buschtöns
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Powered by
FUDForum. Page generated in 0.02502 seconds