4

There are 5 columns in my table view.

  • Col-1 - Non editable
  • Col-2 - NSTextFieldCell (editable)
  • Col-3 - NSComboBoxCell (editable)
  • Col-4 - NSComboBoxCell (editable)
  • Col-5 - NSButtonCell

By default on tab key press the control moves from one editable cell to next editable cell. Only thing I want to change here is when control is in last editable cell i.e. Col-4 and user done with its selection and presses Tab key the control should move down to first editable cell (i.e. Col-2) of next row. I tried to intersect the tab key press using control:textView:doCommandBySelector:. But I am not able to find out from which editable cell it was invoked.

Can someone point me in the right direction as to how to do this?

Am I maybe using the wrong kind of control? Perhaps something else is more appropriate.

Thanks Abhijeet

Monolo
  • 18,205
  • 17
  • 69
  • 103
Abhijeet
  • 55
  • 5

1 Answers1

1

You may be able to benefit from one of the answers posted on this question that I asked years ago regarding the use of arrow keys in NSTableViews. I'm sure it won't be too hard to take one of those answers and tweak it to handle tabs. In fact, I think I did just that in the code I was working on but forgot to update my answer (to my own question). I don't have access to that code any more unfortunately…

Community
  • 1
  • 1
dreamlax
  • 93,976
  • 29
  • 161
  • 209