RichTextBox.SelectedText Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the selected text within the RichTextBox.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[<BrowsableAttribute(false)>]
override SelectedText : string with get, set

Property Value

Type: System.String

A string that represents the selected text in the control.

The following code example demonstrates how to use the SelectionBullet property with the SelectionFont, SelectedText, and SelectionColor properties to create a bulleted list in a RichTextBox control. This example requires that a RichTextBox control named richTextBox1 is created on a form.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: