JFoenix icon indicating copy to clipboard operation
JFoenix copied to clipboard

Customize Tab

Open Natreve opened this issue 10 years ago • 10 comments

How do you change the color of the tabs selection bar and click animation? from the default yellow?

Natreve avatar Mar 15 '16 09:03 Natreve

you can use the following css selectors :

.jfx-tab-pane .tab-header-area .jfx-rippler{
    -jfx-rippler-fill :RED;
}
.jfx-tab-pane .tab-selected-line{
    -fx-stroke : RED;
}

jfoenixadmin avatar Mar 15 '16 10:03 jfoenixadmin

Thanks a lot! that was a big help.

Natreve avatar Mar 15 '16 20:03 Natreve

I'm not sure if this is something new or if that was a typo but for anyone wondering why the rippler color wont change in the newer versions, you can use this instead...

.jfx-tab-pane .tab-header-area .jfx-rippler{
    -jfx-rippler-fill: RED;
}

Sashie avatar Apr 04 '17 23:04 Sashie

I'm using the 1.7.0 version of jfoenix, but i can't change the color of the tabs selection bar :( Everything works except changing the tabs selection bar color.

Here is the code i'm using:

.jfx-tab-pane { -fx-padding: 1px; -fx-background-color: blue, -fx-control-inner-background; -fx-background-insets: 0, 1; }

.jfx-tab-pane .headers-region { -fx-background-color: cornflowerblue; }

.jfx-tab-pane .tab-header-background { -fx-background-color: cornflowerblue; }

.jfx-tab-pane .tab-header-area .jfx-rippler { -jfx-rippler-fill: orange; }

.jfx-tab-pane .tab-header-area .tab-selected-line{ -fx-stroke: red; }

Many thanks.

peteralien avatar Aug 24 '17 13:08 peteralien

Hello, well JFoenix css properties has been updated, we replaced the prefix "-fx" with "-jfx" to distinguish jfoenix properties from original JavaFX properties.

Regards,

jfoenixadmin avatar Aug 25 '17 19:08 jfoenixadmin

For some reason, this doesn't update the selected line's color.

.jfx-tab-pane .tab-selected-line { -fx-stroke: #33ffff; }

Please, correct this script...

Kooldeji avatar Sep 06 '17 10:09 Kooldeji

@Kooldeji

.jfx-tab-pane .tab-selected-line {
    -fx-background-color: #33ffff;
}

skmedix avatar Sep 06 '17 14:09 skmedix

@skmedix Is it possible to Centralize the tabs on the top bar and also change their text fill. The regular -fx-text-fill: #color; ain't working.

Kooldeji avatar Sep 06 '17 17:09 Kooldeji

@Kooldeji Yeah, sure

.jfx-tab-pane .tab .tab-label {
    -fx-font-weight: normal;
    -fx-text-fill: #424242;
    -fx-font-size: 16;
}

.jfx-tab-pane .tab:selected .tab-label {
    -fx-text-fill: #000;
}

I didn't try tab alignment, but when I'll have more free time I'm gonna check it.

skmedix avatar Sep 10 '17 18:09 skmedix

how could i change the "space" between tabs in JFXTabpane via css or java?

ayushchadha23 avatar Jun 01 '18 08:06 ayushchadha23