Remove gray bg behind the tabs in JFX

前端 未结 3 1496
耶瑟儿~
耶瑟儿~ 2021-02-18 19:16

So is there any way to remove the gray area behind the tab(s): \"example\"

I\'ve tried to do this with CSS, but di

3条回答
  •  庸人自扰
    2021-02-18 19:47

    To set the background color of the tabpane header write in the CSS file:

    .tab-pane .tab-header-area .tab-header-background {
        -fx-background-color: yellow;
    }
    


    To remove the borders write:

    .tab-pane .tab-header-area .tab-header-background {
        -fx-effect: null;
    }
    


    To remove the header completely set opacity to 0:

    .tab-pane .tab-header-area .tab-header-background {
        -fx-opacity: 0;
    }
    


    More on style class tab-pane you can find here:
    http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#tabpane

提交回复
热议问题