Make ComboBox ignore Enter key


#1

Hi,

I have ComboBoxes in my UI. When the user clicks on one of them, it displays the list of choices. Then, when pressing enter, the list of choices appears again, as if the component gained keyboard focus, despite setting:

compo->setWantsKeyboardFocus(false);
compo->setMouseClickGrabsKeyboardFocus(false);

How to really make the ComboBox ignore the enter key?

 


#2

Had the same issue and found the solution here:  

http://www.juce.com/forum/topic/preventing-controls-gaining-focus-keyboardfocustraverser