Combo Box is not taking focus if SetEditableText() not calld


#1

Hi Jules,
If i just create a ComboBox, it’s not editable by default. But it is not taking keyboard ficus. Because of that i couldn’t able to select next or previous item through keyboard shortcuts.
So currently i am calling setEditableText(false), just to gainfocus.
I think you will add it in constructor itself…

Thanks,
Noorul


#2

You could also have just called setWantsKeyboardFocus() if you don’t want it to be editable.

Not everyone will always want it to take keyboard focus, so if I was to change the default state, it’d break people’s apps. It’s easy enough to call setWantsKeyboardFocus() while you’re setting up the object.


#3