【发布时间】:2017-01-03 10:34:50
【问题描述】:
我已经尝试过 Remove grid line in tableView 中的以下代码,但这仅允许我更改垂直线颜色而不是水平线颜色。
所以,我正在尝试更改您在下图中看到的白色边框线颜色,我将如何更改此颜色?我正在使用带有 CSS 的 JavaFX。
这是我的 CSS:
.table-view{
-fx-background-color: transparent;
}
.table-view:focused{
-fx-background-color: transparent;
}
.table-view .column-header-background{
-fx-background-color: #262626;
}
.table-view .column-header-background .label{
-fx-background-color: transparent;
-fx-text-fill: #0ed9e0;
}
.table-view .column-header {
-fx-background-color: transparent;
}
.table-view .table-cell{
-fx-text-fill: #0ed9e0;
-fx-alignment: center;
}
.table-row-cell{
-fx-background-color: -fx-table-cell-border-color, #2b2a2a;
-fx-background-insets: 0, 0 0 1 0;
-fx-padding: 0.0em; /* 0 */
}
.table-row-cell:odd{
-fx-background-color: -fx-table-cell-border-color, #262626;
-fx-background-insets: 0, 0 0 1 0;
-fx-padding: 0.0em; /* 0 */
}
.table-row-cell:selected {
-fx-background-color: #005797;
-fx-background-insets: 0;
-fx-background-radius: 1;
}
【问题讨论】:
-
@Jan 这个问题是在我发表评论后由 OP 编辑的,以包含我建议的链接。尽管如此,它不再相关,我会删除评论。