This example demonstrates how to show the WinForms SpellChecker context menu for standard .NET TextBox and RichTextBox controls.
The BarManager component is used to create and show the popup menu. For this, the BarManager.QueryShowPopupMenu event is handled. Menu items are obtained with the SpellChecker.GetCommandsByError method and added to the ItemLinks collection of the newly created popup menu. The BarManager.SetPopupContextMenu method assigns the popup menu to the specified TextBox and RichTextBox controls.
Note that the DevExpress MemoEdit control located on the same form has a built-in SpellChecker support and does not require extra code to show the SpellChecker context menu.
The SpellChecker.PrepareSuggestions event is handled to modify suggested words displayed in the SpellChecker context menu.
![]()
The BarManager component is used to create and show the popup menu. For this, the BarManager.QueryShowPopupMenu event is handled. Menu items are obtained with the SpellChecker.GetCommandsByError method and added to the ItemLinks collection of the newly created popup menu. The BarManager.SetPopupContextMenu method assigns the popup menu to the specified TextBox and RichTextBox controls.
Note that the DevExpress MemoEdit control located on the same form has a built-in SpellChecker support and does not require extra code to show the SpellChecker context menu.
The SpellChecker.PrepareSuggestions event is handled to modify suggested words displayed in the SpellChecker context menu.