• 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
Re: How to remove extra contextual menu items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to remove extra contextual menu items


  • Subject: Re: How to remove extra contextual menu items
  • From: Stéphane Sudre <email@hidden>
  • Date: Mon, 10 Mar 2003 15:03:18 +0100

On Monday, March 10, 2003, at 01:50 PM, j o a r wrote:

Hej,

When using a NSTextField you get two contextual menu items for free: "Ignore Spelling" and "Learn Spelling". I would very much like to be able to remove them, since they aren't applicable for a lot of text fields in our application. Any one knows how to do that?

I have tried to provide a contextual menu by using "-setMenu:", "+defaultMenu" and "-menuForEvent:" on the text fields in question (and via custom subclasses). I have also tried to provide a custom field editor and set "setContinuousSpellCheckingEnabled:" to NO.
No luck so far.

I might be saying something stupid but I suppose that this Contextual menu is attached to the Field Editor and in that case if you want to remove the menu, you may have to:
- subclass NSTextField, NSTextFieldCell
- in the NSTextFieldCell subclass implement the - (NSText *)setUpFieldEditorAttributes:(NSText *)textObj method to set the NSMenu * for the field editor.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: How to remove extra contextual menu items
      • From: j o a r <email@hidden>
References: 
 >How to remove extra contextual menu items (From: j o a r <email@hidden>)

  • Prev by Date: Grep Support in Cocoa
  • Next by Date: Re: speech implemetation
  • Previous by thread: How to remove extra contextual menu items
  • Next by thread: Re: How to remove extra contextual menu items
  • Index(es):
    • Date
    • Thread