• 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
Bounds of selected NSTableView cell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bounds of selected NSTableView cell


  • Subject: Bounds of selected NSTableView cell
  • From: Koen van der Drift <email@hidden>
  • Date: Sun, 08 Apr 2012 11:56:54 -0400

I am trying to find out what the bounds are of the cell of an NSTableView that was clicked in. I'd like to use that rect to show a NSPopover when the user double clicks on a cell. I have this in my NSTableView controller class:


-(IBAction)doubleClickAction:(id)sender
{
	NSInteger row = [sender selectedRow];
	NSCell      *cell = [myTableColumn dataCellForRow: row];
	NSRect	cellRect = [[cell controlView] bounds];

   	 [self.myPopover showRelativeToRect: cellRect ofView:sender preferredEdge:NSMaxXEdge];
}


The popover shows up nicely, but always points to the middle of the table, instead of to the cell that was clicked in.

How can I get the bounds of the cell that was clicked in?

Thanks,

- Koen.




_______________________________________________

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

  • Follow-Ups:
    • Re: Bounds of selected NSTableView cell
      • From: Felix Franz <email@hidden>
  • Prev by Date: Problem with Scripting Bridge under Snow Leopard
  • Next by Date: Re: Bounds of selected NSTableView cell
  • Previous by thread: Problem with Scripting Bridge under Snow Leopard
  • Next by thread: Re: Bounds of selected NSTableView cell
  • Index(es):
    • Date
    • Thread