Making NSTableView behave more like a spreadsheet with arrow keys
Making NSTableView behave more like a spreadsheet with arrow keys
- Subject: Making NSTableView behave more like a spreadsheet with arrow keys
- From: Dave Geering <email@hidden>
- Date: Thu, 5 Mar 2009 15:13:29 +1100
Hi all,
Is there a clean way to subclass NSTableView or the field editor to
provide a way for users to change the currently editable cell in an
NSTableView by pressing the arrow keys? I've already tried subclassing
NSTableView but that will only be sent keyDown if a cell isn't being
edited, and I've tried creating a custom field editor but I cannot
reliably get the current position in the table so I don't know what to
pass to [tableView editColumn:row:withEvent:select] (assuming that's
the way I need to go).
Is NSTableView even the control I want? The table of data in my
application can span perhaps 100 rows and up to 5 columns. The user
will be expected to enter data into a fair majority of these cells. I
already have everything set up using bindings so that the user can
edit the data but it is painstakingly tedious to double-click on each
cell to change it's value. Tabbing works quite well but because there
are other responders in my window, tabbing in the last column takes
you to the next key view.
Thanks,
Dave.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden