San*_*isy 3 java javafx java-8 javafx-2 javafx-8
如何在javafx中设计如上所示的表格.我正在使用tableview并做了一些css,但设计不是我想要的.
请任何人都能告诉我如何实现上述设计
这是我试过的CSS
.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 */
}
Run Code Online (Sandbox Code Playgroud)
目前的设计表
这个图的Css:
.table-view .column-header,
.table-view .column-header .filler,
.table-view .column-header-background .filler {
-fx-background-color: derive;
-fx-stroke: transparent;
-fx-size:50;
-fx-alignment: CENTER ;
-fx-text-alignment: center;
}
.table-row-cell:filled:hover {
-fx-size:50;
-fx-alignment: CENTER;
-fx-text-alignment: center;
}
.table-view:row-selection {
-fx-background-color: transparent;
-fx-text-fill: white;
-fx-fixed-cell-size: 50;
-fx-alignment: CENTER;
-fx-text-alignment: center;
}
.table-view .table-column{
-fx-text-alignment: center;
-fx-alignment: CENTER
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1687 次 |
| 最近记录: |