Delete grid in tableView

I am trying to remove a grid line inside a table view for each cell using css. enter image description here

For example, between the "Name and Description" column there is a row, which I assumed was a grid line. I have no idea to remove it using css. I can do this in Java Swing using setShowGrid (false); but it is not available in javaFX.

+3
source share
2 answers

I assume you are asking about JavaFX 2. If not, I suggest you update :)

Try putting this in a stylesheet:

.table-view {
  -fx-table-cell-border-color: transparent;
}

Or call

tableObject.setStyle("-fx-table-cell-border-color: transparent;")

To keep the horizontal lines, I had to do the following

.table-view .table-row-cell {
  -fx-border-width: 1;
}

, , ...

+9

tableView, @kylejmcintyre.

, :

.column-header-background { visibility: hidden; -fx-padding: -1em; }
0

Source: https://habr.com/ru/post/1652636/


All Articles