Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set tab order in Mac app window

I'm creating a login form that's loaded from a nib. I have several NSTextFields, but when the app is launched, the one that gains focus immediately is the last one I added to the form. How do I set up the tab order and change or remove the initial focus?

like image 498
James Avatar asked Jul 25 '11 20:07

James


People also ask

How do I change the tab order in Winforms?

Tab order can be set in the Properties window of the designer using the TabIndex property. The TabIndex property of a control determines where it's positioned in the tab order. By default, the first control added to the designer has a TabIndex value of 0, the second has a TabIndex of 1, and so on.

How do I change tab settings on Mac?

In the Safari app on your Mac, use Tabs settings to choose how webpages, links, and tabs work in Safari windows. To change these settings, choose Safari > Settings, then click Tabs. Keep tabs in a separate tab bar, or move them into the toolbar.


1 Answers

In the Interface Builder: Right click on the NSTextField, link the nextKeyView with the object you want to be the next one that should be activated by pressing the "tab" button. There's also an option called "Refuse First Responder". This option avoids the blue frame.

like image 71
lbrndnr Avatar answered Nov 15 '22 23:11

lbrndnr