Styling a TableView in CSS (JavaFX)

前端 未结 5 1966
面向向阳花
面向向阳花 2021-01-31 18:15

How can I style the \"THIS\" point in my TableView?

My CSS Code looks as follows:

   */*
 * Empty Stylesheet file.
 */

.root{
    -fx-backgroun         


        
相关标签:
5条回答
  • 2021-01-31 18:24

    I managed to solve this with this CSS code:

    .table-view .filler {
        -fx-border-insets: 10 //Enter value depending on thickness;
    }
    
    0 讨论(0)
  • 2021-01-31 18:34
    .table-view{
       -fx-background-color: transparent;
    }
    

    Background color can be white if no records in TableView. And maybe nice to have styling for placeholder

    0 讨论(0)
  • 2021-01-31 18:38

    Try this

    .table-view .filler{
        -fx-background-color: transparent;
    }
    
    0 讨论(0)
  • 2021-01-31 18:44

    .table-view .filler is the selector you are looking for. The scenic view tool is pretty good for analyzing a component.

    0 讨论(0)
  • 2021-01-31 18:44

    In case anyone came here searching for CSS of column-show-hide button, here is the CSS.

    .table-view .show-hide-columns-button {
        -fx-background-color: red;
        -fx-border-color: -fx-box-border;
        -fx-border-insets: -1 -1 0 0;
    }
    
    0 讨论(0)
提交回复
热议问题