有没有办法仅通过使用 css 为具有值的 tableview 的单元格着色?
最佳答案
可以使用 filled 选择仅包含 any 值的
伪类,例如使用以下样式表:Cell
(即非空的 Cell
)
.table-cell:filled {
-fx-background-color: red;
}
.table-row-cell:selected>.table-cell:filled,
.table-cell:selected:filled {
-fx-background-color: purple;
}
但是,您不能单独使用 CSS 为包含特定 值的Cell
设置样式。
关于css - 具有使用 CSS 值的 Javafx TableView 颜色单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39201479/