How to check if the SWT combo is currently opened?

醉酒当歌 提交于 2019-12-10 14:06:20

问题


I have an SWT combo box in my GUI. Is it possible to check if the combo box has been opened? (I've a mechanism which refreshes the state shown in the combo box, when a user opens it sometimes it jumps between user selection and that what the algorithm thinks is fine, the user selection has a priority over everything else).


回答1:


Combo SWT component have method getListVisible() which returns flag if combo dropdown list part is visible or not.. see documentation for combo for details.




回答2:


The response of Sorceror is about org.eclipse.swt.widgets.Combo

If you need this method on javax.swing.JComboBox you can use isPopupVisible()



来源:https://stackoverflow.com/questions/14579847/how-to-check-if-the-swt-combo-is-currently-opened

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!