Fired when a request is made (usually by a right click on an underlined word) for context menu
Declaration Syntax
C# | C# | Visual Basic | Visual Basic | Visual C++ | Visual C++ | F# | F# |
public event SpellContextMenuRequestEventHandler SpellContextMenuRequest
public event SpellContextMenuRequestEventHandler SpellContextMenuRequest
Public Event SpellContextMenuRequest As SpellContextMenuRequestEventHandler
Public Event SpellContextMenuRequest As SpellContextMenuRequestEventHandler
public: event SpellContextMenuRequestEventHandler^ SpellContextMenuRequest { void add (SpellContextMenuRequestEventHandler^ value); void remove (SpellContextMenuRequestEventHandler^ value); }
public: event SpellContextMenuRequestEventHandler^ SpellContextMenuRequest { void add (SpellContextMenuRequestEventHandler^ value); void remove (SpellContextMenuRequestEventHandler^ value); }
member SpellContextMenuRequest : IEvent<SpellContextMenuRequestEventHandler, SpellContextMenuEventArgs>
member SpellContextMenuRequest : IEvent<SpellContextMenuRequestEventHandler, SpellContextMenuEventArgs>
Remarks
This event is a good way to display the spelling context menu in a developers own context menu.
Setting ShowSuggestionsContextMenu to false will deactivate the automatic context menu that appears when a user
right clicks on a spelling error.
Listeners to this event are notified when a context menu should be shown with spelling suggestions and options,
the event args also include a collection of MenuItem objects with spelling suggestions and Ignore All & Add options;
These menu item click events are already hooked into RapidSpellAsYouType and will function as expected, without further programming.
Examples
Handling the context menu in a custom fashion.
Copy | |
---|---|
..... private Keyoti.RapidSpell.AYTRichTextBox aytRichTextBox1; private Keyoti.RapidSpell.RapidSpellAsYouType rapidSpellAsYouType1; ..... private void InitializeComponent(){ ..... this.rapidSpellAsYouType1.SpellContextMenuRequest += new RapidSpellAsYouType.SpellContextMenuRequestEventHandler(rapidSpellAsYouType1_SpellContextMenuRequest); ..... } private void rapidSpellAsYouType1_SpellContextMenuRequest(object sender, Keyoti.RapidSpell.Event.SpellContextMenuEventArgs e) { //The MenuItem objects in e.MenuItems can be added to any menu as desired. this.aytRichTextBox1.ContextMenu.MenuItems.AddRange((MenuItem[])e.MenuItems); } .... |
Assembly: Keyoti.RapidSpell.NET4 (Module: Keyoti.RapidSpell.NET4.dll) Version: 6.2.21.412