0

选择行时我有.css,这很好。

单击时的行

但是,当我单击该行时,它会用黑色字体将行颜色更改为灰色,有没有办法编辑这个 css?

单击关闭时的行

.table-view {
    -fx-base: transparent;
    -fx-control-inner-background: transparent;
    -fx-background-color: #507CA6;
    -fx-padding: 5;
}

.table-view .column-header-background {
    -fx-background-color: transparent;
}

.table-view .column-header, .table-view .filler {
    -fx-size: 35;
    -fx-border-width: 0 0 1 0;
    -fx-background-color: transparent;
    -fx-border-color: #B4D9FD;
    -fx-border-insets: 0 10 1 0;
}

.table-view .column-header .label {
    -fx-font-size: 14pt;
    -fx-font-family: "Segoe UI Light";
    -fx-text-fill: white;
    -fx-alignment: center-left; 
    -fx-opacity: 1;
}

.table-view:focused .table-row-cell:filled:focused:selected {
    -fx-background-color: #273D51;
}

任何帮助,将不胜感激。

4

2 回答 2

4

尝试这个:

/* When control is selected but not focused */
.table-row-cell:filled:selected,
.table-row-cell:filled > .table-cell:selected {
    -fx-background: red;
}
于 2015-04-29T13:11:08.437 回答
1
于 2015-04-29T13:12:52.217 回答