Re: NSTableView as first responder
Re: NSTableView as first responder
- Subject: Re: NSTableView as first responder
- From: email@hidden
- Date: Thu, 8 May 2003 15:22:27 +0200
On jeudi, mai 8, 2003, at 03:08 PM, Ivan Myrvold wrote:
I can readily make an NSTableView as the first responder with:
[[self window] makeFirstresponder:myTableView];
But how do I make an individual cell in a table view row getting the
focus (other than doubleclick into the row, of course). Is that
possible?
You're looking for something like this? (From the NSTableView
documentation)
editColumn:row:withEvent:select:
- (void)editColumn:(int)columnIndex row:(int)rowIndex
withEvent:(NSEvent *)theEvent select:(BOOL)flag
Edits the cell at columnIndex and rowIndex, selecting its entire
contents if flag is YES. This method is invoked automatically in
response to user actions; you should rarely need to invoke it directly.
theEvent is usually the mouse event that triggered editing; it can be
nil when starting an edit programmatically.
This method scrolls the receiver so that the cell is visible, sets up
the field editor, and sends
selectWithFrame:inView:editor:delegate:start:length: and
editWithFrame:inView:editor:delegate:event: to the field editor's
NSCell object with the NSTableView as the text delegate.
The row at rowIndex must be selected prior to calling
editColumn:row:withEvent:select:, or an exception will be raised.
See Also: - editedColumn, - editedRow
_______________________________________________
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.