Re: How to remove extra contextual menu items
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.