禁用TableView中的特定单元格 [英] Disable specific cells in TableView

查看:86
本文介绍了禁用TableView中的特定单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个JavaFX TableView,里面装有对象的Observable ArrayList.我想禁用TableView中具有某些属性的某些对象.我仍然希望显示这些对象,但希望它们显示为灰色或禁用.我该怎么做? 我没有要禁用的项目的索引.

I have a JavaFX TableView, filled with an Observable ArrayList of objects. I want to disable certain objects in the TableView that have certain properties. I still want these objects displayed, but would like them to be grayed-out or disabled. How would I do this? I do not have the index of the items I want to disable.

推荐答案

我为此找到了一个很好的演练. http://code.makery.ch/blog/javafx-8- tableview-cell-renderer

I found a good walkthrough for this. http://code.makery.ch/blog/javafx-8-tableview-cell-renderer

这篇关于禁用TableView中的特定单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆