Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaFX tableview remove default alternate row color

I couln´t find any example that completely removes/hides this behaviour. Most of those examples painted the rows based on their values, still, empty rows were printed(odd:white, even:gray) and they completely ignored any css code or setStyle. Is it posible to force a tableview to stop printing innecesary/empty rows that just are there to fill the empty space left between the last filled row and the max height of the tableview?

like image 221
Wesos de Queso Avatar asked Jul 31 '16 04:07

Wesos de Queso


1 Answers

In your external CSS file, do

.root {
    -fx-control-inner-background-alt: -fx-control-inner-background ;
}
like image 191
James_D Avatar answered Oct 27 '22 11:10

James_D