How to rotate cell value in spreadsheetview controlsfx?

别说谁变了你拦得住时间么 提交于 2019-12-11 00:48:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!