System.Windows.Forms.RichTextBox Members

The members of System.Windows.Forms.RichTextBox are listed below.

See Also: Inherited members from System.Windows.Forms.TextBoxBase

Public Constructors

Initializes a new instance of the System.Windows.Forms.RichTextBox class.

Public Properties

override
AllowDropbool.

Gets or sets a value indicating whether the control will enable drag-and-drop operations.

override
AutoSizebool.

This property is not relevant to this class.

AutoWordSelectionbool.

Gets or sets a value indicating whether automatic word selection is enabled.

override
BackgroundImageSystem.Drawing.Image.

This property is not relevant to this class.

override
BackgroundImageLayoutImageLayout.

This property is not relevant to this class.

BulletIndentint.

Gets or sets the indentation used in the System.Windows.Forms.RichTextBox control when the bullet style is applied to the text.

[read-only]
CanRedobool.

Gets a value indicating whether there are actions that have occurred within the System.Windows.Forms.RichTextBox that can be reapplied.

DetectUrlsbool.

Gets or sets a value indicating whether or not the System.Windows.Forms.RichTextBox will automatically format a Uniform Resource Locator (URL) when it is typed into the control.

EnableAutoDragDropbool.

Gets or sets a value that enables drag-and-drop operations on text, pictures, and other data.

override
FontSystem.Drawing.Font.

Gets or sets the font used when displaying text in the control.

override
ForeColorSystem.Drawing.Color.

Gets or sets the font color used when displaying text in the control.

LanguageOptionRichTextBoxLanguageOptions.

Gets or sets a value that indicates System.Windows.Forms.RichTextBox settings for Input Method Editor (IME) and Asian language support.

override
MaxLengthint.

Gets or sets the maximum number of characters the user can type or paste into the rich text box control.

override
Multilinebool.

Gets or sets a value indicating whether this is a multiline System.Windows.Forms.RichTextBox control.

[read-only]
RedoActionNamestring.

Gets the name of the action that can be reapplied to the control when the RichTextBox.Redo method is called.

RichTextShortcutsEnabledbool.

This property is not relevant for this class.

RightMarginint.

Gets or sets the size of a single line of text within the System.Windows.Forms.RichTextBox control.

Rtfstring.

Gets or sets the text of the System.Windows.Forms.RichTextBox control, including all rich text format (RTF) codes.

ScrollBarsRichTextBoxScrollBars.

Gets or sets the type of scroll bars to display in the System.Windows.Forms.RichTextBox control.

SelectedRtfstring.

Gets or sets the currently selected rich text format (RTF) formatted text in the control.

override
SelectedTextstring.

Gets or sets the selected text within the System.Windows.Forms.RichTextBox.

SelectionAlignmentHorizontalAlignment.

Gets or sets the alignment to apply to the current selection or insertion point.

SelectionBackColorSystem.Drawing.Color.

Gets or sets the color of text when the text is selected in a System.Windows.Forms.RichTextBox control.

SelectionBulletbool.

Gets or sets a value indicating whether the bullet style is applied to the current selection or insertion point.

SelectionCharOffsetint.

Gets or sets whether text in the control appears on the baseline, as a superscript, or as a subscript below the baseline.

SelectionColorSystem.Drawing.Color.

Gets or sets the text color of the current text selection or insertion point.

SelectionFontSystem.Drawing.Font.

Gets or sets the font of the current text selection or insertion point.

SelectionHangingIndentint.

Gets or sets the distance between the left edge of the first line of text in the selected paragraph and the left edge of subsequent lines in the same paragraph.

SelectionIndentint.

Gets or sets the length, in pixels, of the indentation of the line where the selection starts.

override
SelectionLengthint.

Gets or sets the number of characters selected in control.

SelectionProtectedbool.

Gets or sets a value indicating whether the current text selection is protected.

SelectionRightIndentint.

The distance (in pixels) between the right edge of the System.Windows.Forms.RichTextBox control and the right edge of the text that is selected or added at the current insertion point.

SelectionTabsint[].

Gets or sets the absolute tab stop positions in a System.Windows.Forms.RichTextBox control.

[read-only]
SelectionTypeRichTextBoxSelectionTypes.

Gets the selection type within the control.

ShowSelectionMarginbool.

Gets or sets a value indicating whether a selection margin is displayed in the System.Windows.Forms.RichTextBox.

override
Textstring.

Gets or sets the current text in the rich text box.

[read-only]
override
TextLengthint. Documentation for this section has not yet been entered.
[read-only]
UndoActionNamestring.

Gets the name of the action that can be undone in the control when the TextBoxBase.Undo method is called.

ZoomFactorfloat.

Gets or sets the current zoom level of the System.Windows.Forms.RichTextBox.

Protected Properties

[read-only]
override
CreateParamsCreateParams.

Gets the required creation parameters when the control handle is created.

[read-only]
override
DefaultSizeSystem.Drawing.Size.

Gets the default size of the control.

Public Methods

CanPaste(DataFormats.Format) : bool
Documentation for this section has not yet been entered.
DrawToBitmap(System.Drawing.Bitmap, System.Drawing.Rectangle)

This method is not relevant for this class.

Find(char[]) : int

Searches the text of a System.Windows.Forms.RichTextBox control for the first instance of a character from a list of characters.

Find(string) : int

Searches the text in a System.Windows.Forms.RichTextBox control for a string.

Find(char[], int) : int

Searches the text of a System.Windows.Forms.RichTextBox control, at a specific starting point, for the first instance of a character from a list of characters.

Find(string, RichTextBoxFinds) : int

Searches the text in a System.Windows.Forms.RichTextBox control for a string with specific options applied to the search.

Find(char[], int, int) : int

Searches a range of text in a System.Windows.Forms.RichTextBox control for the first instance of a character from a list of characters.

Find(string, int, RichTextBoxFinds) : int

Searches the text in a System.Windows.Forms.RichTextBox control for a string at a specific location within the control and with specific options applied to the search.

Find(string, int, int, RichTextBoxFinds) : int

Searches the text in a System.Windows.Forms.RichTextBox control for a string within a range of text within the control and with specific options applied to the search.

GetCharFromPosition(System.Drawing.Point) : char
Documentation for this section has not yet been entered.
override
GetCharIndexFromPosition(System.Drawing.Point) : int

Retrieves the index of the character nearest to the specified location.

override
GetLineFromCharIndex(int) : int

Retrieves the line number from the specified character position within the text of the System.Windows.Forms.RichTextBox control.

override
GetPositionFromCharIndex(int) : System.Drawing.Point

Retrieves the location within the control at the specified character index.

LoadFile(string)

Loads a rich text format (RTF) or standard ASCII text file into the System.Windows.Forms.RichTextBox control.

LoadFile(System.IO.Stream, RichTextBoxStreamType)

Loads the contents of an existing data stream into the System.Windows.Forms.RichTextBox control.

LoadFile(string, RichTextBoxStreamType)

Loads a specific type of file into the System.Windows.Forms.RichTextBox control.

Paste(DataFormats.Format)
Documentation for this section has not yet been entered.
Redo()

Reapplies the last operation that was undone in the control.

SaveFile(string)

Saves the contents of the System.Windows.Forms.RichTextBox to a rich text format (RTF) file.

SaveFile(System.IO.Stream, RichTextBoxStreamType)

Saves the contents of a System.Windows.Forms.RichTextBox control to an open data stream.

SaveFile(string, RichTextBoxStreamType)

Saves the contents of the System.Windows.Forms.RichTextBox to a specific type of file.

Protected Methods

CreateRichEditOleCallback() : object

Creates an IRichEditOleCallback-compatible object for handling rich-edit callback operations.

override
OnBackColorChanged(EventArgs)

Raises the Control.BackColorChanged event.

OnContentsResized(ContentsResizedEventArgs)

Raises the RichTextBox.ContentsResized event.

override
OnContextMenuChanged(EventArgs)

Raises the Control.ContextMenuChanged event.

override
OnHandleCreated(EventArgs)

Raises the Control.HandleCreated event.

override
OnHandleDestroyed(EventArgs)

Raises the Control.HandleDestroyed event.

OnHScroll(EventArgs)

Raises the RichTextBox.HScroll event.

OnImeChange(EventArgs)

Raises the RichTextBox.ImeChange event.

OnLinkClicked(LinkClickedEventArgs)

Raises the RichTextBox.LinkClicked event.

OnProtected(EventArgs)

Raises the RichTextBox.Protected event.

override
OnRightToLeftChanged(EventArgs)
Documentation for this section has not yet been entered.
OnSelectionChanged(EventArgs)

Raises the RichTextBox.SelectionChanged event.

override
OnSystemColorsChanged(EventArgs)
Documentation for this section has not yet been entered.
override
OnTextChanged(EventArgs)
Documentation for this section has not yet been entered.
OnVScroll(EventArgs)

Raises the RichTextBox.VScroll event.

override
ProcessCmdKey(ref Message, Keys) : bool
Documentation for this section has not yet been entered.
override
WndProc(ref Message)
Documentation for this section has not yet been entered.

Public Events

BackgroundImageChanged

Occurs when the value of the RichTextBox.BackgroundImage property changes.

BackgroundImageLayoutChanged

Occurs when the value of the RichTextBox.BackgroundImageLayout property changes.

ContentsResized

Occurs when contents within the control are resized.

DoubleClickDocumentation for this section has not yet been entered.
DragDrop

Occurs when the user completes a drag-and-drop

DragEnter

Occurs when an object is dragged into the control's bounds.

DragLeave

Occurs when an object is dragged out of the control's bounds.

DragOver

Occurs when an object is dragged over the control's bounds.

GiveFeedback

Occurs during a drag operation.

HScroll

Occurs when the user clicks the horizontal scroll bar of the control.

ImeChange

Occurs when the user switches input methods on an Asian version of the Windows operating system.

LinkClicked

Occurs when the user clicks on a link within the text of the control.

Protected

Occurs when the user attempts to modify protected text in the control.

QueryContinueDrag

This event is not relevant to this class.

SelectionChanged

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

VScroll

Occurs when the user clicks the vertical scroll bars of the control.