I can right align text in all columns in a TableView using the following css:
.right-aligned .table-cell {
-fx-alignment: center-right;
}
And in code setting:
table.getStyleClass().add("right-aligned");
But, if I want to instead just right align the text in a single column using the same css and the following code:
emailCol.getStyleClass().add("right-aligned");
The emailCol is not right aligned.
For test purposes I am using Example 13.6 from the TableView control tutorial:
http://docs.oracle.com/javafx/2/ui_controls/table-view.htm#CJABHGAJ
Related StackOverflow question:
http://stackoverflow.com/questions/13455326/javafx-tableview-text-alignmen
.right-aligned .table-cell {
-fx-alignment: center-right;
}
And in code setting:
table.getStyleClass().add("right-aligned");
But, if I want to instead just right align the text in a single column using the same css and the following code:
emailCol.getStyleClass().add("right-aligned");
The emailCol is not right aligned.
For test purposes I am using Example 13.6 from the TableView control tutorial:
http://docs.oracle.com/javafx/2/ui_controls/table-view.htm#CJABHGAJ
Related StackOverflow question:
http://stackoverflow.com/questions/13455326/javafx-tableview-text-alignmen