Re: Disable PDFView context menu
Re: Disable PDFView context menu
- Subject: Re: Disable PDFView context menu
- From: Nick <email@hidden>
- Date: Mon, 26 Mar 2012 21:41:02 +0200
mouseDown is called for the left mouse button only.
otherMouseDown - when the scrollwheel is clicked.
The only problem is rightMouseDown which is not being invoked at all..
I was hoping there's some way to make PDFView receive this message..
Otherwise I will need to render the PDF page on a custom NSView, which
doesn't seem to be wise..
26 марта 2012 г. 20:41 пользователь Antonio Nunes
<email@hidden> написал:
> On 26 Mar 2012, at 19:09, Nick wrote:
>
>> However, I still can't receive -rightMouseDown message. I am returning
>> "nil" in the method -(NSMenu*)menuForEvent, which disabled the context
>> menu.
>> But how can I process right-mouse-button clicks?..
>
> PDFView doesn't play very nice with clicks. If you allow PDFView to intercept a mouseDown (i.e. not overriding it), then you pretty much lose control over the whole click tracking. I suppose you can override mouseDown: and query the event for buttonNumber and use that to recognize a right mouse down (NSRightMouse). (Haven't tried this myself though.)
>
> -António
>
> -----------------------------------------------
> Touch is a language without words
> -----------------------------------------------
>
>
>
>
_______________________________________________
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