问题
I tried using the code below
//css
.spreadsheet-cell.verticalHeader{
-fx-rotate: -90;
-fx-background-color: white;
}
//controller
cell = SpreadsheetCellType.STRING.createCell(row, 2, 1,1, "Pin");
cell.getStyleClass().add("verticalHeader");
rows.add(cell);
but the output is like this:
回答1:
What do you want to do exactly? You are applying a rotation on the cell itself, therefore rotating the whole Node.
My advice would be to set a null value in the SpreadsheetCell, and set a Label inside the SpreadsheetCell's graphic. Then you would be able to rotate the Label inside the Node. Of course, you would encounter some issue if you would like to edit these values but that could be done.
Consider posting you questions in our google group as we get notified and you might get quicker answers : http://groups.controlsfx.org/
来源:https://stackoverflow.com/questions/55998266/how-to-rotate-cell-value-in-spreadsheetview-controlsfx