On 3 Jul 2014, at 03:40, Tim Hewett <tghewe...@onetel.com> wrote: > I have an NSOutlineView with a NSImageView subview providing a background > image. Now a pop-up menu has been added to the outline view it seems the menu > only appears with a secondary click on a trackpad. Ctrl-click and the right > mouse button do not pop up the menu. > > Removing the background image causes the menu to work as wanted. > > It seems the image is blocking the events for the outline view menu (except > for the trackpad secondary clicks…!?), is there a way to get the mouse events > through to the outline view? The addSubview:positioned:relativeTo: method has > been tried using NSWindowBelow has been tried for the image view as an > attempt to add it “behind” the outline view but made no difference. NSControl subclasses use a private tracking loop. See http://www.cocoabuilder.com/archive/cocoa/115981-nsimageview-subclass-and-mouseup.html
The following likely won’y solve your issue but may point you in the right direction https://gist.github.com/mugginsoft/10022512 An alternative to using an NSImageView would be to call - (void)drawInRect:(NSRect)dstRect fromRect:(NSRect)srcRect operation:(NSCompositingOperation)op fraction:(CGFloat)delta from an appropriate -drawRect: to draw the background image directly. Jonathan _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com