Respecting table cell padding

This commit is contained in:
Daniel Wolf 2018-02-08 10:08:43 +01:00
parent 7fcaa2ddf7
commit ce54ba60a7
1 changed files with 4 additions and 1 deletions

View File

@ -88,7 +88,10 @@ class MainView : View() {
cell.graphic = Text().apply {
textProperty().bind(cell.itemProperty())
fillProperty().bind(cell.textFillProperty())
wrappingWidthProperty().bind(tableColumn.widthProperty())
val widthProperty = tableColumn.widthProperty()
.minus(cell.paddingLeftProperty)
.minus(cell.paddingRightProperty)
wrappingWidthProperty().bind(widthProperty)
}
cell.prefHeight = Control.USE_COMPUTED_SIZE
}