• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Distinguishing between table row/column double click?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Distinguishing between table row/column double click? (From: René Puls <email@hidden>)
 >Re: Distinguishing between table row/column double click? (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Problem Instantiating a Nib
  • Next by Date: Re: Customized NSTextView drawing
  • Previous by thread: Re: Distinguishing between table row/column double click?
  • Next by thread: Can NSImage use image masks?
  • Index(es):
    • Date
    • Thread