System.Windows.Forms.ToolStripTextBox Members

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

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

Public Constructors

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

Initializes a new instance of the System.Windows.Forms.ToolStripTextBox class with the specified name.

Initializes a new instance of the System.Windows.Forms.ToolStripTextBox class derived from a base control.

Public Properties

AcceptsReturnbool.

Gets or sets a value indicating whether pressing ENTER in a multiline System.Windows.Forms.TextBox control creates a new line of text in the control or activates the default button for the form.

AcceptsTabbool.

Gets or sets a value indicating whether pressing the TAB key in a multiline text box control types a TAB character in the control instead of moving the focus to the next control in the tab order.

AutoCompleteCustomSourceAutoCompleteStringCollection.

Gets or sets a custom string collection to use when the ToolStripTextBox.AutoCompleteSource property is set to CustomSource.

AutoCompleteModeAutoCompleteMode.

Gets or sets an option that controls how automatic completion works for the System.Windows.Forms.ToolStripTextBox.

AutoCompleteSourceAutoCompleteSource.

Gets or sets a value specifying the source of complete strings used for automatic completion.

override
BackgroundImageSystem.Drawing.Image.

This property is not relevant to this class.

override
BackgroundImageLayoutImageLayout.

This property is not relevant to this class.

BorderStyleBorderStyle.

Gets or sets the border type of the System.Windows.Forms.ToolStripTextBox control.

[read-only]
CanUndobool.

Gets a value indicating whether the user can undo the previous operation in a System.Windows.Forms.ToolStripTextBox control.

CharacterCasingCharacterCasing.

Gets or sets whether the System.Windows.Forms.ToolStripTextBox control modifies the case of characters as they are typed.

HideSelectionbool.

Gets or sets a value indicating whether the selected text in the text box control remains highlighted when the control loses focus.

Linesstring[].

Gets or sets the lines of text in a System.Windows.Forms.ToolStripTextBox control.

MaxLengthint.

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

Modifiedbool.

Gets or sets a value that indicates that the System.Windows.Forms.ToolStripTextBox control has been modified by the user since the control was created or its contents were last set.

Multilinebool.

This property is not relevant to this class.

ReadOnlybool.

Gets or sets a value indicating whether text in the System.Windows.Forms.ToolStripTextBox is read-only.

SelectedTextstring.

Gets or sets a value indicating the currently selected text in the control.

SelectionLengthint.

Gets or sets the number of characters selected in theSystem.Windows.Forms.ToolStripTextBox.

SelectionStartint.

Gets or sets the starting point of text selected in theSystem.Windows.Forms.ToolStripTextBox.

ShortcutsEnabledbool.

Gets or sets a value indicating whether the defined shortcuts are enabled.

[read-only]
TextBoxTextBox.

Gets the hosted System.Windows.Forms.TextBox control.

TextBoxTextAlignHorizontalAlignment.

Gets or sets how text is aligned in a System.Windows.Forms.TextBox control.

[read-only]
TextLengthint.

Gets the length of text in the control.

WordWrapbool.

This property is not relevant to this class.

Protected Properties

[read-only]
override
DefaultMarginPadding.

Gets the spacing, in pixels, between the System.Windows.Forms.ToolStripTextBox and adjacent items.

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

Gets the default size of the System.Windows.Forms.ToolStripTextBox.

Public Methods

AppendText(string)

Appends text to the current text of the System.Windows.Forms.ToolStripTextBox.

Clear()

Clears all text from the System.Windows.Forms.ToolStripTextBox control.

ClearUndo()

Clears information about the most recent operation from the undo buffer of the System.Windows.Forms.ToolStripTextBox.

Copy()

Copies the current selection in the System.Windows.Forms.ToolStripTextBox to the Clipboard.

Cut()

Moves the current selection in the System.Windows.Forms.ToolStripTextBox to the Clipboard.

DeselectAll()

Specifies that the value of the ToolStripTextBox.SelectionLength property is zero so that no characters are selected in the control.

GetCharFromPosition(System.Drawing.Point) : char

Retrieves the character that is closest to the specified location within the control.

GetCharIndexFromPosition(System.Drawing.Point) : int

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

GetFirstCharIndexFromLine(int) : int

Retrieves the index of the first character of a given line.

GetFirstCharIndexOfCurrentLine() : int

Retrieves the index of the first character of the current line.

GetLineFromCharIndex(int) : int

Retrieves the line number from the specified character position within the text of the control.

GetPositionFromCharIndex(int) : System.Drawing.Point

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

override
GetPreferredSize(System.Drawing.Size) : System.Drawing.Size
Documentation for this section has not yet been entered.
Paste()

Replaces the current selection in the text box with the contents of the Clipboard.

ScrollToCaret()

Scrolls the contents of the control to the current caret position.

Select(int, int)

Selects a range of text in the text box.

SelectAll()

Selects all text in the text box.

Undo()

Undoes the last edit operation in the text box.

Protected Methods

Public Events

AcceptsTabChanged

Occurs when the value of the ToolStripTextBox.AcceptsTab property changes.

BorderStyleChanged

Occurs when the value of the ToolStripTextBox.BorderStyle property changes.

HideSelectionChanged

Occurs when the value of the ToolStripTextBox.HideSelection property changes.

ModifiedChanged

Occurs when the value of the ToolStripTextBox.Modified property changes.

MultilineChanged

This event is not relevant to this class.

ReadOnlyChanged

Occurs when the value of the ToolStripTextBox.ReadOnly property changes.

TextBoxTextAlignChanged

Occurs when the value of the ToolStripTextBox.TextBoxTextAlign property changes.