如何旋转电子表格视图控件fx中的单元格值? [英] How to rotate cell value in spreadsheetview controlsfx?
问题描述
我尝试使用下面的代码
//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);
但是输出是这样的:
推荐答案
您要确切地做什么?您正在对单元格本身进行旋转,因此将整个节点旋转.
What do you want to do exactly? You are applying a rotation on the cell itself, therefore rotating the whole Node.
我的建议是在SpreadsheetCell中设置一个空值,并设置一个
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.
请在我们收到通知后考虑将您的问题发布到我们的google组中,您可能会得到更快的答案: http://groups .controlsfx.org/
Consider posting you questions in our google group as we get notified and you might get quicker answers : http://groups.controlsfx.org/
这篇关于如何旋转电子表格视图控件fx中的单元格值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!