Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 tornadofx 在 javafx tableview 单元格中插入按钮或任何其他类型的组件?我的情况是我有一个列标题“操作”。我需要在表格视图中呈现几个操作按钮。
使用该cellFormat函数并将带有按钮的容器分配给graphic单元格的属性:
cellFormat
graphic
column("Name", SomeObject::someproperty).cellFormat { graphic = hbox(spacing = 5) { button("Action 1").action { doSomething() } button("Action 2").action { doSomethingElse() } } }