Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Collapse]Spell Checker
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Collapse]Examples
     How to: Add Dictionaries at Runtime
     How to: Switch Between Languages
     How to: Use the SharedDictionaryStorage Component
     How to: Check Spelling of a Grid Cell
     How to: Turn On the Check-As-You-Type Mode
     How to: Add Spell Check Menu to the Standard Text Controls
     How to: Obtain a List of Commands for the Misspelled Word
     How To: Customize the Spelling Dialog
     How to: Customize the Spelling Options Dialog
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Add Spell Check Menu to the Standard Text Controls

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T236002.

This example demonstrates how to show the WinForms SpellChecker context menu for standard .NET System.Windows.Controls.TextBox and System.Windows.Forms.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 PopupMenuBase.ItemLinks collection of the newly created popup menu. The BarManager.SetPopupContextMenu method assigns the popup menu to the specified TextBox and RichTextBox controls.

The MemoEdit control located on the same form has built-in SpellChecker support and does not require extra code to show the SpellChecker context menu.

The SpellCheckerBase.PrepareSuggestions event is handled to modify suggested words displayed in the SpellChecker context menu.

How would you rate this topic?​​​​​​​