This documentation is archived and is not being maintained.

RichTextBox.SelectionChanged Event

Occurs when the selection of text within the control has changed.

[Visual Basic]
Public Event SelectionChanged As EventHandler
public event EventHandler SelectionChanged;
public: __event EventHandler* SelectionChanged;

[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type EventArgs.


You can create an event handler for this event to determine when the user has changed text selection within the control. An event handler for this event can be used to keep text selected until the user has completed a task within the application.

For more information about handling events, see Consuming Events.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

RichTextBox Class | RichTextBox Members | System.Windows.Forms Namespace