Question

I have a couple of NSPopupButtons on my view and they are defined as a newKeyView after one of the text fields. The problem is that somehow they are not getting the focus ring when pressing the tab button comes to them, like they are ignored. What should be done in order for them to get a focus ring?

Thanks,

Nava

Was it helpful?

Solution

The default behavior in OSX is to only have certain controls be navigable by the tab key. You can change this in the keyboard preferences pane in System Preferences. In the Keyboard Shortcuts tab, select the "All controls" radio button.

OTHER TIPS

You can create a subclass of NSPopupButton and override method canBecomeKeyView, returning YES. My code using python:

class ComboBox(AppKit.NSPopUpButton):
    def canBecomeKeyView(self):
        return True
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top