0

I have a combo box in my OSX app and I want it to lose focus right after I change the value selection.

Right now it just stays selected and highlighted after the selection.

Any kind of help is highly appreciated!

Eugene Gordin
  • 4,047
  • 3
  • 47
  • 80

1 Answers1

0

Just figured this out myself.

Using NSComboBoxDelegate, I use this method

- (void)comboBoxWillDismiss:(NSNotification *)notification 

It's getting called right before the pop-up list is going to be dismissed. Inside that method I'm calling:

[myComboBox setRefusesFirstResponder:YES]; 

and it does the trick.

Eugene Gordin
  • 4,047
  • 3
  • 47
  • 80