# ComboBox::lookAndFeelChanged() setWantsKeyboardFocus - bug?

**URL:** <https://forum.juce.com/t/combobox-lookandfeelchanged-setwantskeyboardfocus-bug/18544>\
**Category:** General JUCE discussion\
**Created:** [July 26, 2016, 3:19pm UTC](https://forum.juce.com/t/combobox-lookandfeelchanged-setwantskeyboardfocus-bug/18544 "2016-07-26T15:19:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [July 26, 2016, 3:19pm UTC](https://forum.juce.com/t/combobox-lookandfeelchanged-setwantskeyboardfocus-bug/18544/1 "2016-07-26T15:19:15Z")

</div>

I’m trying to make my plugin not to react on keyboard pressings.  
I’m easily setting setWantsKeyboardFocus(false) for every component.  
This works very good.  
But not on Combobox, and i think i found the reason.

In lookAndFeelChanged() function of ComboBox, if the label is non-editable, this will result in a call to setWantsKeyboardFocus(true), which makes no sense i think.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [July 27, 2016, 12:31pm UTC](https://forum.juce.com/t/combobox-lookandfeelchanged-setwantskeyboardfocus-bug/18544/2 "2016-07-27T12:31:58Z")

</div>

Any idea how to make the ComboBox not to react on keyboard pressings ? Whenever the hierarchy changes ComboBox changes the focus behavior again because it calls lookandfeelchanged again.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [July 28, 2016, 2:29pm UTC](https://forum.juce.com/t/combobox-lookandfeelchanged-setwantskeyboardfocus-bug/18544/3 "2016-07-28T14:29:23Z")

</div>

bump567890

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [July 29, 2016, 11:19am UTC](https://forum.juce.com/t/combobox-lookandfeelchanged-setwantskeyboardfocus-bug/18544/4 "2016-07-29T11:19:49Z")

</div>

OK should be fixed on the develop. Let me know if this works for you.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [July 29, 2016, 12:47pm UTC](https://forum.juce.com/t/combobox-lookandfeelchanged-setwantskeyboardfocus-bug/18544/5 "2016-07-29T12:47:15Z")

</div>

Looks very good! Thanks!
