• 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
NSCheckbox right click in an NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSCheckbox right click in an NSOutlineView


  • Subject: NSCheckbox right click in an NSOutlineView
  • From: Alex Kac <email@hidden>
  • Date: Wed, 01 Apr 2015 08:34:35 -0600

I have an NSCheckbox in a view based NSOutlineView. I want to support
Control-click for the right click menu when a user control-clicks on the
cell. Right click works perfectly already per the standard NSOutlineView.
However because the NSCheckbox is eating the click, it doesn't do a right
click menu when you control-click.

https://www.dropbox.com/s/zjt5heg0mgotatd/Screenshot 2015-04-01 08.34.26.png?dl=0

I've been trying different things, but via SO it seems like people subclass
NSButton to check for the control click:

- (void) mouseDown:(NSEvent *)theEvent

{

if ((theEvent.modifierFlags & NSControlKeyMask) == NSControlKeyMask)

{

// [[self nextResponder] rightMouseDown:theEvent];

}

else

[super mouseDown:theEvent];

}


However I now need to figure out how to get to the parent where a
rightMouseDown brings up the menu. I'm sure this can't be all that uncommon
- so what's the best way to handle this?
_______________________________________________

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


  • Prev by Date: Re: how to slim down view controllers?
  • Next by Date: Re: NSOpenPanel accessoryView clicks must hit pixels to work
  • Previous by thread: Re: how to slim down view controllers?
  • Next by thread: Re: NSOpenPanel accessoryView clicks must hit pixels to work
  • Index(es):
    • Date
    • Thread