-fx-background-image seems to be always painted over with content.
I tried to reduce everything to a minimum, so i gave it a extra css-style with image-attributs only.
/*controlStyle.css*/
.button2
{
-fx-background-image: url("BtnDBg.gif");
-fx-background-image-repeat:repeat-x;
-fx-background-image-size: auto;
}
And gave my button this style only.
scene.getStylesheets().addAll("/test/controlStyle.css");
b.getStyleClass().remove(0); //remove button styleclass
b.getStyleClass().add("button2"); //add button2 styleclass
It still is painted like a normal button. (see screenshot)
Is there a way to set -fx-background-color or -fx-color to opaque, so the background-image is visible? do i have a completly wrong approach or is there anything wrong with the painting order?
Kind Regards,
Matthias Weidemann
I tried to reduce everything to a minimum, so i gave it a extra css-style with image-attributs only.
/*controlStyle.css*/
.button2
{
-fx-background-image: url("BtnDBg.gif");
-fx-background-image-repeat:repeat-x;
-fx-background-image-size: auto;
}
And gave my button this style only.
scene.getStylesheets().addAll("/test/controlStyle.css");
b.getStyleClass().remove(0); //remove button styleclass
b.getStyleClass().add("button2"); //add button2 styleclass
It still is painted like a normal button. (see screenshot)
Is there a way to set -fx-background-color or -fx-color to opaque, so the background-image is visible? do i have a completly wrong approach or is there anything wrong with the painting order?
Kind Regards,
Matthias Weidemann