Removing JavaFX ListView borders


I'm trying to completly remove ListView borders from my app (in css) but nothing works.

There is structure in FXML like: HBox > AnchorPane > ListView

I tried to apply:

-fx-border-width: 0px;

to .hbox, .anchorpane (classes applied to nodes), .list-view and .list-cell but it looks like there is something more inside listview that still has border. How to remove it completely?

edit: problem solved. It was caused by default -fx-padding: 1px;

listview borders

5/1/2014 4:46:07 PM

Accepted Answer

The answer is to use:

-fx-padding: 1px;
5/5/2015 2:31:09 PM

Remove JavaFX default control border (e.g., for ListView and SplitPane):

.list-view, .split-pane { -fx-background-insets: 0; -fx-padding: 0; }

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow