• 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
disabling right-mouse click and ctrl+click?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

disabling right-mouse click and ctrl+click?


  • Subject: disabling right-mouse click and ctrl+click?
  • From: Conor Dearden <email@hidden>
  • Date: Fri, 04 Mar 2005 00:06:18 +0100

If it's all inside a webView, then you can use webViews delegate method:

- (NSArray *)webView:(WebView *)sender
contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray
*)defaultMenuItems

You can just return an empty array for no contextual menus, or even better,
remove the menus you don't want from the defaultMenuItems.  The element
defines what is being clicked on, like a text field, a picture, a link.

You have to set the UI delegate for you webView with setUIDelegate: or in
interface builder.  You can remove MenuItems by name, but if your
application is going to be used in other languages I would suggest doing it
by their selector.

Conor Dearden
www.Bruji.com


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: NSSlider and mouse events
  • Next by Date: How to concatenate two values?
  • Previous by thread: Re: disabling right-mouse click and ctrl+click?
  • Next by thread: When do bound UI items set their data source?
  • Index(es):
    • Date
    • Thread