I can see that when I set the alignment of one property to right, for example (using table.setColumnAlignment(“myProperty”, Table.ALIGN_RIGHT)).
Both the columns content AND the header (column caption) move to the right.
How can I have an header alignment different from the datas below …? is it possible ?
(In fact I would like that all headers stay centered, whatever the columns alignment maybe)…
I don’t know how good workaround this is (maybe I get a few angry messages for suggesting this) but you could probably manipulate the header style with css.
You probably have to do something else. I suggest you change the alignment first in java and check the difference in the inline css of the header, and redo that in your theme. But be careful, changing some things in the css that you are not supposed to do can’t break quite a lot.
If I change the style sheet property with text-align : center
All column headers on which I did not define any specific alignment are centered.
But, if I set a column alignment to right, for example, all the column and the header content move to right…
It seems that when we define the column alignment, its text-alignment property is forced or redefined…?
…this will finally make your table header alignment “independent” of table.setColumnAlignment() calls.
You could also use “.v-table-caption-container-align-left{…}” or “.v-table-caption-container-align-right{…}” for making the headers caption left or right justified respectively.