Javafx-2 – JavaFX scrollpane border and background

I have some questions about the default background and border of scrollpane

setStyle("-fx-background-color:blue; -fx-border-color:crimson;");

I tried this style, no luck, only the red border left, let me leave the blue one

setStyle("-fx-background-color:blue; -fx-background-insets:0; -fx-border-color:crimson; -fx-border-width:0; -fx-border-insets:0;");

I read this old post JavaFX hide scrollpane gray border and http://docs.oracle.com/javafx/2/ui_controls/editor.htm

Not even this line of code

scrollPane.getStyleClass().add("noborder-scroll-pane");

thank you

Solution

In the current version of JavaFX 8, you can use the edge to edge style class to completely remove the border:

<ScrollPane styleClass="edge-to-edge"/>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>