Tab Setting for NSTextFields NSView

I am trying to set the tab order for NSTextFields for a given NSView. As far as I understand, I need to connect NSTextFields using InterfaceBuilder by setting the next output line of KeyView to the next NSTextField. I did it - and there is no effect. When I click on a tab while in one of NSTextFields, it just loses focus, and that’s it. No matter how often I click the tab, none of the other NSTextFields regains focus.

I also read that I need to set initialFirstResponder from a window. I don’t think I can do this in this particular case, because my AppDelegate calls up the NSView, which in turn acts as a menu area with many different buttons, each of which calls up different NSViews that load as subviews of another view, Therefore, AppDelegate does not know which NSView is currently loaded.

Is there any way to set tab order of NSTextFields based on NSView?

thank

+3
source share
2 answers

You need to disable the automatic recalculation of the key cycle in the window. See -[NSWindow setAutorecalculatesKeyViewLoop:].

Edited to add: this can also be installed in Interface Builder.

+1
source

, NSView NSView. NSTextFields. , , , ... ( IB , "" > "" ). . , none: .

0

All Articles