How to check if the SWT command is currently open?

I have a SWT combo box in my GUI. Can I check if the combo box has been opened? (I have a mechanism that updates the state indicated in the combo box when the user opens it, sometimes it jumps between the user’s choice and what the algorithm considers the right one, the user's choice takes precedence over everything else).

+5
source share
2 answers

The SWT Combo component has a method getListVisible()that returns a flag if a combo drop-down list is displayed or not. See the documentation for combos for more information .

+3
source

The Wizard's answer is roughly org.eclipse.swt.widgets.Combo

javax.swing.JComboBox, isPopupVisible()

0

All Articles