Open SchweinchenFuntik opened 4 years ago
The cell can only be formatted, or only editable. CellDecorator - does not solve the problem
CellDecorator
formatting only:
column(...) { makeEditable() cellFormat { text = "fomatm" } }
editing only:
column(...) { cellFormat { text = "fomatm" } makeEditable() }
This is because cellFactory is overridden.
cellFactory
makeEditable: cellFactory = TextFieldTableCell.forTableColumn<T, S>(Converter() as Converter<S>)
cellFactory = TextFieldTableCell.forTableColumn<T, S>(Converter() as Converter<S>)
cellFormat:
fun <S, T> TableColumn<S, T>.cellFormat(scope: Scope = FX.defaultScope, formatter: TableCell<S, T>.(T) -> Unit) { properties["tornadofx.cellFormat"] = formatter if (properties["tornadofx.cellFormatCapable"] != true) cellFactory = Callback { SmartTableCell<S, T>(scope, it) } }
edvin/tornadofx2#35
The cell can only be formatted, or only editable.
CellDecorator
- does not solve the problemformatting only:
editing only:
This is because
cellFactory
is overridden.makeEditable:
cellFactory = TextFieldTableCell.forTableColumn<T, S>(Converter() as Converter<S>)
cellFormat: