Remove grid line in tableView

风格不统一 提交于 2019-11-29 11:14:33

I assume you're asking about JavaFX 2. If not, I suggest you upgrade :)

Try putting this in your stylesheet:

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

Or call

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

In order to keep horizontal lines, I had to do the following

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

There's probably a better way to do this, but this worked for me...

to remove grid line in tableView what @kylejmcintyre said is true.

to hide the table header do this:

.column-header-background { visibility: hidden; -fx-padding: -1em; }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!