How to set listview border in JavaFX


Question

I've tried digging through the JavaFX CSS reference and googling but have been unsuccessful in figuring out how to remove the border on a listview in JavaFX.

I've tried setting the border and stroke widths to 0px. I've tried setting the border/stroke colors to transparent. No matter what I do, there is what looks to be a 1px solid black border around the listview.

Any ideas on how to get rid of it?

1
7
3/14/2014 6:14:15 PM

Accepted Answer

Try

list.setStyle("-fx-background-insets: 0 ;");
15
3/14/2014 6:18:45 PM

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