ToolStripTextBox Class

 

Represents a text box in a ToolStrip that allows the user to enter text.

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

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Windows.Forms.ToolStripItem
        System.Windows.Forms.ToolStripControlHost
          System.Windows.Forms.ToolStripTextBox

<ToolStripItemDesignerAvailabilityAttribute(ToolStripItemDesignerAvailability.None Or ToolStripItemDesignerAvailability.ToolStrip Or ToolStripItemDesignerAvailability.MenuStrip Or ToolStripItemDesignerAvailability.ContextMenuStrip)>
Public Class ToolStripTextBox
	Inherits ToolStripControlHost

NameDescription
System_CAPS_pubmethodToolStripTextBox()

Initializes a new instance of the ToolStripTextBox class.

System_CAPS_pubmethodToolStripTextBox(Control)

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

System_CAPS_pubmethodToolStripTextBox(String)

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

NameDescription
System_CAPS_pubpropertyAcceptsReturn

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

System_CAPS_pubpropertyAcceptsTab

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.

System_CAPS_pubpropertyAccessibilityObject

Gets the AccessibleObject assigned to the control.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyAccessibleDefaultActionDescription

Gets or sets the default action description of the control for use by accessibility client applications.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyAccessibleDescription

Gets or sets the description that will be reported to accessibility client applications.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyAccessibleName

Gets or sets the name of the control for use by accessibility client applications.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyAccessibleRole

Gets or sets the accessible role of the control, which specifies the type of user interface element of the control.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyAlignment

Gets or sets a value indicating whether the item aligns towards the beginning or end of the ToolStrip.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyAllowDrop

Gets or sets a value indicating whether drag-and-drop and item reordering are handled through events that you implement.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyAnchor

Gets or sets the edges of the container to which a ToolStripItem is bound and determines how a ToolStripItem is resized with its parent.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyAutoCompleteCustomSource

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

System_CAPS_pubpropertyAutoCompleteMode

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

System_CAPS_pubpropertyAutoCompleteSource

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

System_CAPS_pubpropertyAutoSize

Gets or sets a value indicating whether the item is automatically sized.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyAutoToolTip

Gets or sets a value indicating whether to use the Text property or the ToolTipText property for the ToolStripItem ToolTip. (Inherited from ToolStripItem.)

System_CAPS_pubpropertyAvailable

Gets or sets a value indicating whether the ToolStripItem should be placed on a ToolStrip.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyBackColor

Gets or sets the background color for the control.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyBackgroundImage

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.(Overrides ToolStripControlHost.BackgroundImage.)

System_CAPS_pubpropertyBackgroundImageLayout

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.(Overrides ToolStripControlHost.BackgroundImageLayout.)

System_CAPS_pubpropertyBorderStyle

Gets or sets the border type of the ToolStripTextBox control.

System_CAPS_pubpropertyBounds

Gets the size and location of the item.(Inherited from ToolStripItem.)

System_CAPS_protpropertyCanRaiseEvents

Gets a value indicating whether the component can raise an event.(Inherited from Component.)

System_CAPS_pubpropertyCanSelect

Gets a value indicating whether the control can be selected.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyCanUndo

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

System_CAPS_pubpropertyCausesValidation

Gets or sets a value indicating whether the hosted control causes and raises validation events on other controls when the hosted control receives focus.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyCharacterCasing

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

System_CAPS_pubpropertyContainer

Gets the IContainer that contains the Component.(Inherited from Component.)

System_CAPS_pubpropertyContentRectangle

Gets the area where content, such as text and icons, can be placed within a ToolStripItem without overwriting background borders.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyControl

Gets the Control that this ToolStripControlHost is hosting.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyControlAlign

Gets or sets the alignment of the control on the form.(Inherited from ToolStripControlHost.)

System_CAPS_protpropertyDefaultAutoToolTip

Gets a value indicating whether to display the ToolTip that is defined as the default.(Inherited from ToolStripItem.)

System_CAPS_protpropertyDefaultDisplayStyle

Gets a value indicating what is displayed on the ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_protpropertyDefaultMargin

Gets the spacing, in pixels, between the ToolStripTextBox and adjacent items.(Overrides ToolStripItem.DefaultMargin.)

System_CAPS_protpropertyDefaultPadding

Gets the internal spacing characteristics of the item.(Inherited from ToolStripItem.)

System_CAPS_protpropertyDefaultSize

Gets the default size of the ToolStripTextBox.(Overrides ToolStripControlHost.DefaultSize.)

System_CAPS_protpropertyDesignMode

Gets a value that indicates whether the Component is currently in design mode.(Inherited from Component.)

System_CAPS_protpropertyDismissWhenClicked

Gets a value indicating whether items on a ToolStripDropDown are hidden after they are clicked.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyDisplayStyle

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyDock

Gets or sets which ToolStripItem borders are docked to its parent control and determines how a ToolStripItem is resized with its parent.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyDoubleClickEnabled

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyEnabled

Gets or sets a value indicating whether the parent control of the ToolStripItem is enabled.(Inherited from ToolStripControlHost.)

System_CAPS_protpropertyEvents

Gets the list of event handlers that are attached to this Component.(Inherited from Component.)

System_CAPS_pubpropertyFocused

Gets a value indicating whether the control has input focus.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyFont

Gets or sets the font to be used on the hosted control.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyForeColor

Gets or sets the foreground color of the hosted control.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyHeight

Gets or sets the height, in pixels, of a ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyHideSelection

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

System_CAPS_pubpropertyImage

This API supports the product infrastructure and is not intended to be used directly from your code. The image associated with the object.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyImageAlign

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyImageIndex

Gets or sets the index value of the image that is displayed on the item.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyImageKey

Gets or sets the key accessor for the image in the ImageList that is displayed on a ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyImageScaling

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyImageTransparentColor

This property is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyIsDisposed

Gets a value indicating whether the object has been disposed of.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyIsOnDropDown

Gets a value indicating whether the container of the current Control is a ToolStripDropDown. (Inherited from ToolStripItem.)

System_CAPS_pubpropertyIsOnOverflow

Gets a value indicating whether the Placement property is set to Overflow.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyLines

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

System_CAPS_pubpropertyMargin

Gets or sets the space between the item and adjacent items.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyMaxLength

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

System_CAPS_pubpropertyMergeAction

Gets or sets how child menus are merged with parent menus. (Inherited from ToolStripItem.)

System_CAPS_pubpropertyMergeIndex

Gets or sets the position of a merged item within the current ToolStrip.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyModified

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

System_CAPS_pubpropertyMultiline

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.

System_CAPS_pubpropertyName

Gets or sets the name of the item.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyOverflow

Gets or sets whether the item is attached to the ToolStrip or ToolStripOverflowButton or can float between the two.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyOwner

Gets or sets the owner of this item.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyOwnerItem

Gets the parent ToolStripItem of this ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyPadding

Gets or sets the internal spacing, in pixels, between the item's contents and its edges.(Inherited from ToolStripItem.)

System_CAPS_protpropertyParent

Gets or sets the parent container of the ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyPlacement

Gets the current layout of the item.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyPressed

Gets a value indicating whether the state of the item is pressed. (Inherited from ToolStripItem.)

System_CAPS_pubpropertyReadOnly

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

System_CAPS_pubpropertyRightToLeft

Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyRightToLeftAutoMirrorImage

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertySelected

Gets a value indicating whether the item is selected.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertySelectedText

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

System_CAPS_pubpropertySelectionLength

Gets or sets the number of characters selected in theToolStripTextBox.

System_CAPS_pubpropertySelectionStart

Gets or sets the starting point of text selected in theToolStripTextBox.

System_CAPS_pubpropertyShortcutsEnabled

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

System_CAPS_protpropertyShowKeyboardCues

Gets a value indicating whether to show or hide shortcut keys.(Inherited from ToolStripItem.)

System_CAPS_pubpropertySite

Gets or sets the site of the hosted control.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertySize

Gets or sets the size of the ToolStripItem.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyTag

Gets or sets the object that contains data about the item.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyText

Gets or sets the text to be displayed on the hosted control.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyTextAlign

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyTextBox

Gets the hosted TextBox control.

System_CAPS_pubpropertyTextBoxTextAlign

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

System_CAPS_pubpropertyTextDirection

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyTextImageRelation

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubpropertyTextLength

Gets the length of text in the control.

System_CAPS_pubpropertyToolTipText

Gets or sets the text that appears as a ToolTip for a control.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyVisible

Gets or sets a value indicating whether the item is displayed.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyWidth

Gets or sets the width in pixels of a ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_pubpropertyWordWrap

This property is not relevant to this class.

NameDescription
System_CAPS_pubmethodAppendText(String)

Appends text to the current text of the ToolStripTextBox.

System_CAPS_pubmethodClear()

Clears all text from the ToolStripTextBox control.

System_CAPS_pubmethodClearUndo()

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

System_CAPS_pubmethodCopy()

Copies the current selection in the ToolStripTextBox to the Clipboard.

System_CAPS_protmethodCreateAccessibilityInstance()

Creates a new accessibility object for the control.(Inherited from ToolStripControlHost.)

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodCut()

Moves the current selection in the ToolStripTextBox to the Clipboard.

System_CAPS_pubmethodDeselectAll()

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

System_CAPS_pubmethodDispose()

Releases all resources used by the Component.(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the ToolStripControlHost and optionally releases the managed resources.(Inherited from ToolStripControlHost.)

System_CAPS_pubmethodDoDragDrop(Object, DragDropEffects)

Begins a drag-and-drop operation.(Inherited from ToolStripItem.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.(Inherited from Component.)

System_CAPS_pubmethodFocus()

Gives the focus to a control.(Inherited from ToolStripControlHost.)

System_CAPS_pubmethodGetCharFromPosition(Point)

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

System_CAPS_pubmethodGetCharIndexFromPosition(Point)

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

System_CAPS_pubmethodGetCurrentParent()

Retrieves the ToolStrip that is the container of the current ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_pubmethodGetFirstCharIndexFromLine(Int32)

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

System_CAPS_pubmethodGetFirstCharIndexOfCurrentLine()

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

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetLineFromCharIndex(Int32)

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

System_CAPS_pubmethodGetPositionFromCharIndex(Int32)

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

System_CAPS_pubmethodGetPreferredSize(Size)

Retrieves the size of a rectangular area into which a control can be fitted.(Overrides ToolStripControlHost.GetPreferredSize(Size).)

System_CAPS_protmethodGetService(Type)

Returns an object that represents a service provided by the Component or by its Container.(Inherited from Component.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodInvalidate()

Invalidates the entire surface of the ToolStripItem and causes it to be redrawn.(Inherited from ToolStripItem.)

System_CAPS_pubmethodInvalidate(Rectangle)

Invalidates the specified region of the ToolStripItem by adding it to the update region of the ToolStripItem, which is the area that will be repainted at the next paint operation, and causes a paint message to be sent to the ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_protmethodIsInputChar(Char)

Determines whether a character is an input character that the item recognizes.(Inherited from ToolStripItem.)

System_CAPS_protmethodIsInputKey(Keys)

Determines whether the specified key is a regular input key or a special key that requires preprocessing.(Inherited from ToolStripItem.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodOnAcceptsTabChanged(EventArgs)

Raises the AcceptsTabChanged event.

System_CAPS_protmethodOnAvailableChanged(EventArgs)

Raises the AvailableChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnBackColorChanged(EventArgs)

Raises the BackColorChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnBorderStyleChanged(EventArgs)

Raises the BorderStyleChanged event.

System_CAPS_protmethodOnBoundsChanged()

Occurs when the Bounds property changes.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnClick(EventArgs)

Raises the Click event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnDisplayStyleChanged(EventArgs)

Raises the DisplayStyleChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnDoubleClick(EventArgs)

Raises the DoubleClick event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnDragDrop(DragEventArgs)

Raises the DragDrop event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnDragEnter(DragEventArgs)

Raises the DragEnter event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnDragLeave(EventArgs)

Raises the DragLeave event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnDragOver(DragEventArgs)

Raises the DragOver event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnEnabledChanged(EventArgs)

Raises the EnabledChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnEnter(EventArgs)

Raises the Enter event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnFontChanged(EventArgs)

Raises the FontChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnForeColorChanged(EventArgs)

Raises the ForeColorChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnGiveFeedback(GiveFeedbackEventArgs)

Raises the GiveFeedback event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnGotFocus(EventArgs)

Raises the GotFocus event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnHideSelectionChanged(EventArgs)

Raises the HideSelectionChanged event.

System_CAPS_protmethodOnHostedControlResize(EventArgs)

Synchronizes the resizing of the control host with the resizing of the hosted control.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnKeyDown(KeyEventArgs)

Raises the KeyDown event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnKeyPress(KeyPressEventArgs)

Raises the KeyPress event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnKeyUp(KeyEventArgs)

Raises the KeyUp event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnLayout(LayoutEventArgs)

Raises the Layout event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnLeave(EventArgs)

Raises the Leave event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnLocationChanged(EventArgs)

Raises the LocationChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnLostFocus(EventArgs)

Raises the LostFocus event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnModifiedChanged(EventArgs)

Raises the ModifiedChanged event.

System_CAPS_protmethodOnMouseDown(MouseEventArgs)

Raises the MouseDown event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnMouseEnter(EventArgs)

Raises the MouseEnter event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnMouseHover(EventArgs)

Raises the MouseHover event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnMouseLeave(EventArgs)

Raises the MouseLeave event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnMouseMove(MouseEventArgs)

Raises the MouseMove event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnMouseUp(MouseEventArgs)

Raises the MouseUp event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnMultilineChanged(EventArgs)

Raises the MultilineChanged event.

System_CAPS_protmethodOnOwnerChanged(EventArgs)

Raises the OwnerChanged event. (Inherited from ToolStripItem.)

System_CAPS_protmethodOnOwnerFontChanged(EventArgs)

Raises the FontChanged event when the Font property has changed on the parent of the ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnPaint(PaintEventArgs)

Raises the Paint event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnParentBackColorChanged(EventArgs)

Raises the BackColorChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnParentChanged(ToolStrip, ToolStrip)

Raises the ParentChanged event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnParentEnabledChanged(EventArgs)

Raises the EnabledChanged event when the Enabled property value of the item's container changes.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnParentForeColorChanged(EventArgs)

Raises the ForeColorChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnParentRightToLeftChanged(EventArgs)

Raises the RightToLeftChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnQueryContinueDrag(QueryContinueDragEventArgs)

Raises the QueryContinueDrag event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnReadOnlyChanged(EventArgs)

Raises the ReadOnlyChanged event.

System_CAPS_protmethodOnRightToLeftChanged(EventArgs)

Raises the RightToLeftChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnSubscribeControlEvents(Control)

Subscribes events from the hosted control.(Overrides ToolStripControlHost.OnSubscribeControlEvents(Control).)

System_CAPS_protmethodOnTextChanged(EventArgs)

Raises the TextChanged event.(Inherited from ToolStripItem.)

System_CAPS_protmethodOnUnsubscribeControlEvents(Control)

Unsubscribes events from the hosted control.(Overrides ToolStripControlHost.OnUnsubscribeControlEvents(Control).)

System_CAPS_protmethodOnValidated(EventArgs)

Raises the Validated event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnValidating(CancelEventArgs)

Raises the Validating event.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodOnVisibleChanged(EventArgs)

Raises the VisibleChanged event.(Inherited from ToolStripItem.)

System_CAPS_pubmethodPaste()

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

System_CAPS_pubmethodPerformClick()

Generates a Click event for a ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_protmethodProcessCmdKey(Message, Keys)

Processes a command key.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodProcessDialogKey(Keys)

Processes a dialog key.(Inherited from ToolStripControlHost.)

System_CAPS_protmethodProcessMnemonic(Char)

Processes a mnemonic character.(Inherited from ToolStripControlHost.)

System_CAPS_pubmethodResetBackColor()

This API supports the product infrastructure and is not intended to be used directly from your code. This method is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubmethodResetDisplayStyle()

This API supports the product infrastructure and is not intended to be used directly from your code. This method is not relevant to this class.(Inherited from ToolStripItem.)

System_CAPS_pubmethodResetFont()

This API supports the product infrastructure and is not intended to be used directly from your code. This method is not relevant to this class.(Inherited from ToolStripItem.)

System_CAPS_pubmethodResetForeColor()

This API supports the product infrastructure and is not intended to be used directly from your code. This method is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubmethodResetImage()

This API supports the product infrastructure and is not intended to be used directly from your code. This method is not relevant to this class.(Inherited from ToolStripItem.)

System_CAPS_pubmethodResetMargin()

This API supports the product infrastructure and is not intended to be used directly from your code. This method is not relevant to this class.(Inherited from ToolStripItem.)

System_CAPS_pubmethodResetPadding()

This API supports the product infrastructure and is not intended to be used directly from your code. This method is not relevant to this class.(Inherited from ToolStripItem.)

System_CAPS_pubmethodResetRightToLeft()

This API supports the product infrastructure and is not intended to be used directly from your code. This method is not relevant to this class.(Inherited from ToolStripItem.)

System_CAPS_pubmethodResetTextDirection()

This API supports the product infrastructure and is not intended to be used directly from your code. This method is not relevant to this class.(Inherited from ToolStripItem.)

System_CAPS_pubmethodScrollToCaret()

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

System_CAPS_pubmethodSelect()

Selects the item.(Inherited from ToolStripItem.)

System_CAPS_pubmethodSelect(Int32, Int32)

Selects a range of text in the text box.

System_CAPS_pubmethodSelectAll()

Selects all text in the text box.

System_CAPS_protmethodSetBounds(Rectangle)

Sets the size and location of the item.(Inherited from ToolStripItem.)

System_CAPS_protmethodSetVisibleCore(Boolean)

Sets the ToolStripItem to the specified visible state. (Inherited from ToolStripControlHost.)

System_CAPS_pubmethodToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.(Inherited from ToolStripItem.)

System_CAPS_pubmethodUndo()

Undoes the last edit operation in the text box.

NameDescription
System_CAPS_pubeventAcceptsTabChanged

Occurs when the value of the AcceptsTab property changes.

System_CAPS_pubeventAvailableChanged

Occurs when the value of the Available property changes.(Inherited from ToolStripItem.)

System_CAPS_pubeventBackColorChanged

Occurs when the value of the BackColor property changes.(Inherited from ToolStripItem.)

System_CAPS_pubeventBorderStyleChanged

Occurs when the value of the BorderStyle property changes.

System_CAPS_pubeventClick

Occurs when the ToolStripItem is clicked.(Inherited from ToolStripItem.)

System_CAPS_pubeventDisplayStyleChanged

This API supports the product infrastructure and is not intended to be used directly from your code. This event is not relevant to this class.(Inherited from ToolStripControlHost.)

System_CAPS_pubeventDisposed

Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)

System_CAPS_pubeventDoubleClick

Occurs when the item is double-clicked with the mouse.(Inherited from ToolStripItem.)

System_CAPS_pubeventDragDrop

Occurs when the user drags an item and the user releases the mouse button, indicating that the item should be dropped into this item.(Inherited from ToolStripItem.)

System_CAPS_pubeventDragEnter

Occurs when the user drags an item into the client area of this item.(Inherited from ToolStripItem.)

System_CAPS_pubeventDragLeave

Occurs when the user drags an item and the mouse pointer is no longer over the client area of this item.(Inherited from ToolStripItem.)

System_CAPS_pubeventDragOver

Occurs when the user drags an item over the client area of this item.(Inherited from ToolStripItem.)

System_CAPS_pubeventEnabledChanged

Occurs when the Enabled property value has changed.(Inherited from ToolStripItem.)

System_CAPS_pubeventEnter

Occurs when the hosted control is entered.(Inherited from ToolStripControlHost.)

System_CAPS_pubeventForeColorChanged

Occurs when the ForeColor property value changes.(Inherited from ToolStripItem.)

System_CAPS_pubeventGiveFeedback

Occurs during a drag operation.(Inherited from ToolStripItem.)

System_CAPS_pubeventGotFocus

Occurs when the hosted control receives focus.(Inherited from ToolStripControlHost.)

System_CAPS_pubeventHideSelectionChanged

Occurs when the value of the HideSelection property changes.

System_CAPS_pubeventKeyDown

Occurs when a key is pressed and held down while the hosted control has focus.(Inherited from ToolStripControlHost.)

System_CAPS_pubeventKeyPress

Occurs when a key is pressed while the hosted control has focus.(Inherited from ToolStripControlHost.)

System_CAPS_pubeventKeyUp

Occurs when a key is released while the hosted control has focus.(Inherited from ToolStripControlHost.)

System_CAPS_pubeventLeave

Occurs when the input focus leaves the hosted control.(Inherited from ToolStripControlHost.)

System_CAPS_pubeventLocationChanged

Occurs when the location of a ToolStripItem is updated.(Inherited from ToolStripItem.)

System_CAPS_pubeventLostFocus

Occurs when the hosted control loses focus.(Inherited from ToolStripControlHost.)

System_CAPS_pubeventModifiedChanged

Occurs when the value of the Modified property changes.

System_CAPS_pubeventMouseDown

Occurs when the mouse pointer is over the item and a mouse button is pressed.(Inherited from ToolStripItem.)

System_CAPS_pubeventMouseEnter

Occurs when the mouse pointer enters the item.(Inherited from ToolStripItem.)

System_CAPS_pubeventMouseHover

Occurs when the mouse pointer hovers over the item.(Inherited from ToolStripItem.)

System_CAPS_pubeventMouseLeave

Occurs when the mouse pointer leaves the item.(Inherited from ToolStripItem.)

System_CAPS_pubeventMouseMove

Occurs when the mouse pointer is moved over the item.(Inherited from ToolStripItem.)

System_CAPS_pubeventMouseUp

Occurs when the mouse pointer is over the item and a mouse button is released.(Inherited from ToolStripItem.)

System_CAPS_pubeventMultilineChanged

This event is not relevant to this class.

System_CAPS_pubeventOwnerChanged

Occurs when the Owner property changes. (Inherited from ToolStripItem.)

System_CAPS_pubeventPaint

Occurs when the item is redrawn.(Inherited from ToolStripItem.)

System_CAPS_pubeventQueryAccessibilityHelp

Occurs when an accessibility client application invokes help for the ToolStripItem.(Inherited from ToolStripItem.)

System_CAPS_pubeventQueryContinueDrag

Occurs during a drag-and-drop operation and allows the drag source to determine whether the drag-and-drop operation should be canceled.(Inherited from ToolStripItem.)

System_CAPS_pubeventReadOnlyChanged

Occurs when the value of the ReadOnly property changes.

System_CAPS_pubeventRightToLeftChanged

Occurs when the RightToLeft property value changes.(Inherited from ToolStripItem.)

System_CAPS_pubeventTextBoxTextAlignChanged

Occurs when the value of the TextBoxTextAlign property changes.

System_CAPS_pubeventTextChanged

Occurs when the value of the Text property changes.(Inherited from ToolStripItem.)

System_CAPS_pubeventValidated

Occurs after the hosted control has been successfully validated.(Inherited from ToolStripControlHost.)

System_CAPS_pubeventValidating

Occurs while the hosted control is validating.(Inherited from ToolStripControlHost.)

System_CAPS_pubeventVisibleChanged

Occurs when the value of the Visible property changes.(Inherited from ToolStripItem.)

ToolStripTextBox is the TextBox optimized for hosting in a ToolStrip. A subset of the hosted control's properties and events are exposed at the ToolStripTextBox level, but the underlying TextBox control is fully accessible through the TextBox property.

The ToolStripTextBox control allows the user to enter text in an application. This control has additional functionality that is not found in the standard Windows text box control, including multiline editing.

Typically, a ToolStripTextBox control is used to display a single line of text or accept it as input. You can use the Multiline to enable multiple lines of text to be displayed or entered. Set the AcceptsTab and AcceptsReturn properties to true to allow greater text manipulation in a multiline ToolStripTextBox control.

You can limit the amount of text entered into a ToolStripTextBox control by setting the MaxLength property to a specific number of characters. Use the CharacterCasing property to allow the user to type only uppercase, only lowercase, or a combination of uppercase and lowercase characters into the ToolStripTextBox control.

To restrict text from being entered in a ToolStripTextBox control, you can create an event handler for the KeyDown event in order to validate each character entered in the control. You can also restrict all entry of data in a ToolStripTextBox control by setting the ReadOnly property to true.

The following code example demonstrates a ToolStripTextBox with various common property settings, including automatic completion options.

Imports System
Imports System.Text
Imports System.Windows.Forms

Public Class Form1
   Inherits Form
   Private toolStrip1 As ToolStrip
   Private toolStripTextBox1 As ToolStripTextBox

   Public Sub New()
      InitializeComponent()
   End Sub

   <STAThread()>  _
   Shared Sub Main()
      Application.EnableVisualStyles()
      Application.Run(New Form1())
   End Sub


   Private Sub InitializeComponent()
      toolStrip1 = New System.Windows.Forms.ToolStrip()
      toolStripTextBox1 = New System.Windows.Forms.ToolStripTextBox()
      toolStrip1.SuspendLayout()
      SuspendLayout()
      ' 
      ' toolStrip1
      ' 
      toolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {toolStripTextBox1})
      toolStrip1.Location = New System.Drawing.Point(0, 0)
      toolStrip1.Name = "toolStrip1"
      toolStrip1.Size = New System.Drawing.Size(292, 25)
      toolStrip1.TabIndex = 0
      toolStrip1.Text = "toolStrip1"
      ' This code example demonstrates the syntax for setting
      ' various ToolStripTextBox properties.
      ' 
      toolStripTextBox1.AcceptsReturn = True
      toolStripTextBox1.AcceptsTab = True
      toolStripTextBox1.AutoCompleteCustomSource.AddRange(New String() {"This is line one.", "Second line.", "Another line."})
      toolStripTextBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
      toolStripTextBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
      toolStripTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
      toolStripTextBox1.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
      toolStripTextBox1.HideSelection = False
      toolStripTextBox1.MaxLength = 32000
      toolStripTextBox1.Name = "toolStripTextBox1"
      toolStripTextBox1.ShortcutsEnabled = False
      toolStripTextBox1.Size = New System.Drawing.Size(100, 25)
      toolStripTextBox1.Text = "STRING1" + ControlChars.Cr + ControlChars.Lf + "STRING2" + ControlChars.Cr + ControlChars.Lf + "STRING3" + ControlChars.Cr + ControlChars.Lf + "STRING4"
      toolStripTextBox1.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center
      ' 
      ' Form1
      ' 
      ClientSize = New System.Drawing.Size(292, 273)
      Controls.Add(toolStrip1)
      Name = "Form1"
      toolStrip1.ResumeLayout(False)
      toolStrip1.PerformLayout()
      ResumeLayout(False)
      PerformLayout()
   End Sub
End Class

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: