Re: Distinguishing between table row/column double click?
Re: Distinguishing between table row/column double click?
- Subject: Re: Distinguishing between table row/column double click?
- From: René Puls <email@hidden>
- Date: Tue, 11 May 2004 18:56:16 +0200
Am 11.05.2004 um 18:24 schrieb Fritz Anderson:
- (IBAction) doubleClick: (id) sender
{
NSTableHeaderView * header = [sender headerView];
NSEvent * event = [NSApp currentEvent];
NSPoint location = [event locationInWindow];
location = [[header superview] convertPoint: location fromView: nil];
if ([header hitTest: location])
NSLog(@"In header view");
else
NSLog(@"In row");
}
Wow. This does exactly what I want. :-)
I have turned this into a convenience method [NSTableView
currentEventIsInHeaderView] - that makes it easier to re-use the code
in other actions.
Thank you Fritz!
Kind regards,
Reni Puls
_______________________________________________
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.