Tuesday, July 7, 2009

Combo box tip

Just stumbled upon a combo box issue that might boggle ya. When adding listeners for keyboard KEY_DOWN type events you may run into trouble when opening a combo box. It may disable your key pressed listener.
Solution is simple. The Combo box draws focus away from the stage because it has its own keyboard commands for navigating the combo box. It gets left on even after your selection. Solution =
someObject.setFocus()
to draw focus away after combo box dropdown closed or a selection made.

No comments:

Post a Comment