Wesos de Queso
Wesos de Queso

Reputation: 1572

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?

Upvotes: 4

Views: 2319

Answers (1)

James_D
James_D

Reputation: 209684

In your external CSS file, do

.root {
    -fx-control-inner-background-alt: -fx-control-inner-background ;
}

Upvotes: 6

Related Questions