Re: How do you tab into an NSTableView?
Re: How do you tab into an NSTableView?
- Subject: Re: How do you tab into an NSTableView?
- From: Dave Camp <email@hidden>
- Date: Mon, 11 Aug 2003 09:19:40 -0700
For future list reference, the answer to my question was to subclass
the table view and override the following method:
- (BOOL) needsPanelToBecomeKey
{
return YES;
}
That will make the table highlight correctly when you tab in. If there
are no rows currently selected, you won't see anything unless you press
the up or down arrows. You could work around that by forcing a row
(maybe the first row) to be selected when the table is created or
something. You might also be able to override another existing method
and force a row to be selected if there is not a current selection when
the table becomes key.
Hope that helps,
Dave
On Saturday, August 9, 2003, at 03:27 AM, Neil Earnshaw wrote:
On Friday, August 8, 2003, at 06:58 PM, Dave Camp wrote:
I've got a window with three combo-boxes and an NSTableView. The
window's first responder is set to the first combo-box, and each
combo-box has it's nextKeyView set to the next box. The last box's
nextKeyView is set to the NSTableView, and it points to the first
box. A nice big loop, just as you would expect.
However, pressing tab only cycles between the combo-boxes. The
NSTableView never highlights. If I click a row in the table view and
press Tab, it cycles back to the combo-boxes as expected, but
subsequent tabbing never makes the table view key again.
I just had a play with one of my windows that has a browser and a
table view in a tab view. The browser's nextKeyView is set to the
table in IB. When I hit <tab> I can see the browser lose the focus,
but the table shows no sign that it's received it ... until I press
the down arrow key! Then a row highlights.
Does anyone know if, after tabbing into a table, you can get a table
cell into edit mode using just the keyboard? I hate having to resort
to the mouse just to start editing.
- Neil
---
The path of least resistance, it's not just for electricity any more.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.