Export (0) Print
Expand All

RichTextBox.SelectedText Property

Gets or sets the selected text within the RichTextBox.

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

[<BrowsableAttribute(false)>]
abstract SelectedText : string with get, set
[<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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft