【问题标题】:TreeTableView: Cell Format dependent on another column (TornadoFx)TreeTableView:依赖于另一列的单元格格式 (TornadoFx)
【发布时间】:2017-12-24 07:31:35
【问题描述】:

我在 TornadoFx 中定义了一个 treeTableView

treeTableView = TreeTableView<EntityItem>().apply {
        column("Id", EntityItem::id).prefWidth(200).cellFormat {
            //how to refer to value of property Name ?
        }
        column("Name", EntityItem::name).prefWidth(200)

我想根据属性/列“名称”的值来格式化单元格“Id”

我怎样才能做到这一点?

【问题讨论】:

    标签: tornadofx cell-formatting


    【解决方案1】:

    您可以使用rowItem 属性访问当前行的项目。这可能为 null,因此请确保使用 null 安全运算符 (?) 访问它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-14
      相关资源
      最近更新 更多