gpt4 book ai didi

java - 在 CSS (JavaFX) 中为 TableView 设置样式

转载 作者:IT老高 更新时间:2023-10-28 20:53:15 26 4
gpt4 key购买 nike

如何在 TableView 中设置“THIS”点的样式?

TableView

我的 CSS 代码如下所示:

   */*
* Empty Stylesheet file.
*/

.root{
-fx-background-color: #262626;
}

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

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

/* Spaltenköpfe
Struktur column-header-background -> column-header */

.table-view .column-header-background{
-fx-background-color: linear-gradient(#131313 0%, #424141 100%);
}

.table-view .column-header-background .label{
-fx-background-color: transparent;
-fx-text-fill: white;
}

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

.table-view .table-cell{
-fx-text-fill: white;
}

.table-row-cell{
-fx-background-color: -fx-table-cell-border-color, #616161;
-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, #424242;
-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;
}

.table-view > .virtual-flow > .scroll-bar:vertical,
.table-view > .virtual-flow > .scroll-bar:vertical > .track,
.table-view > .virtual-flow > .scroll-bar:vertical > .track-background,
.table-view > .virtual-flow > .scroll-bar:horizontal,
.table-view > .virtual-flow > .scroll-bar:horizontal > .track,
.table-view > .virtual-flow > .scroll-bar:horizontal > .track-background {
-fx-background-color: transparent;
}



.table-view > .virtual-flow > .scroll-bar > .increment-button,
.table-view > .virtual-flow > .scroll-bar > .decrement-button {
-fx-opacity: 0;
}*

如您所见,我已经更改了colum-header-background 和类似的所有内容。我还改变了 TableView 的背景。所以我真的不知道我应该在我的 CSS 中改变什么。感谢您的每一个帮助! :)

-GhostfaceChilla-

最佳答案

.table-view .filler 是您正在寻找的选择器。 scenic view tool非常适合分析组件。

关于java - 在 CSS (JavaFX) 中为 TableView 设置样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33938811/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com