objective c - "Tab" between controls without tab key -


I have a window that is happy between your controls using tabs and tabs and shift-tab keys. However, I also want to be able to move between control between up and down arrow keys (in this case) How can this be achieved?

For non-text controls, you should be able to get something with such that the respondent series Somewhere in (eg, your NSWindowController):

  - (zero) keydown: (nsevent *) event {NSWindow * window = [self window]; Switch ([[Event characters] ObjectOutIndexX: 0]) {Case of NSTARROF Function: [Window Makefirst Responder: [[Window First Responder] Previous Widekiewview]]; break; Case NSDownArrowFunctionKey: [Window makeFirstResponder: [[Window FirstResponder] nextValidKeyView]]; break; Default: [Super Keydown: Event]; break; }}  

and in text field delegates:

  - (BOOL) control: (NSControl *) Control text view: (NSTextView *) textView doCommandBySelector :( SEL) Command {NSWindow * window = [Control Window]; If (command == @selector (moveUp :)) [[Window Makefender Responder: [[Window First Respondor] Previous ValidKeyView]]; Yes come back } And if (command == @sillector (hilldown :)) [[Window makefirst responder: [[window first reponsor] next ValidKeyView]]; Yes come back } no return; }  

(Text view is the same method for delegates.)


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -