javafx - 使ListView无法通过鼠标选择 [英] javafx - make ListView not selectable via mouse

查看:166
本文介绍了javafx - 使ListView无法通过鼠标选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JavaFX中是否有一个选项可以通过鼠标取消选择 ListView 中的项目的可能性?

Is there an option in JavaFX to deactivate the possibility to select the items in a ListView via mouse?

我想在没有任何用户交互的情况下显示 ListView

I'd like to just display a ListView without any user interaction possible.

推荐答案

您也可以尝试:

listview.setMouseTransparent( true );
listView.setFocusTraversable( false );

这篇关于javafx - 使ListView无法通过鼠标选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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