javafx - 单元格背景超过单元格高度
问题描述
我有一个包含几列和几行的 TableView。这是CSS的摘录:
.table-view {
-fx-font-size: 8.0pt;
}
.table-row-cell {
-fx-cell-size: 1.8em;
}
在细胞工厂是:
StringBuilder style = new StringBuilder();
if (item.getWeight() != null) {
style.append("-fx-font-weight: ").append(item.getWeight()).append("; ");
}
if (item.getTextColor() != null) {
style.append("-fx-text-fill: ").append(item.getTextColor().toString().replace("0x","#")).append("; ");
}
if (item.getBackgroundColor() != null) {
style.append("-fx-background-color: ").append(item.getBackgroundColor().toString().replace("0x","#")).append("; ");
}
setStyle(style.toString());
现在,问题是当我设置背景颜色时,背景变得大于单元格高度。
我找不到问题出在哪里。
解决方案
推荐阅读
- excel - 如何在受保护的工作表上使用代码“.Copy destination:=”
- python - 用python解决一个字符在一个列表中的数学问题
- webpack - 新的“npx create-next-app”应用程序无法编译
- c# - xUnit / Fluent 断言应该().Throw
如果不抛出,则带有消息 - r - 改进 JAGS MCMC 运行时
- c# - 如何在不绑定的情况下按数字分隔文本框的内容?
- python - 如何在某个位置将列从一个数据帧插入/移植到另一个数据帧?
- typescript - 打字稿 - d.ts 文件中的类型未找到
- c# - 对派生类中的重写方法使用基类 Doxygen 注释
- python - Python/ Beautiful Soup 数据显示问题