System.windows.forms.textbox text
Retrieves the location within the control at the specified character index. GetPreferredSize Size. Retrieves the size of a rectangular area into which a control can be fitted. Retrieves the bounds within which the control is scaled. GetService Type. GetStyle ControlStyles. Retrieves the value of the specified control style bit for the control. Determines if the control is a top-level control. Conceals the control from the user.
Obtains a lifetime service object to control the lifetime policy for this instance. Called after the control has been added to another container.
Invalidates the entire surface of the control and causes the control to be redrawn. Invalidate Boolean. Invalidate Rectangle. Invalidate Rectangle, Boolean. Invalidate Region. Invalidate Region, Boolean. Invoke Action.
Executes the specified delegate on the thread that owns the control's underlying window handle. Invoke Delegate. Invoke Delegate, Object[]. IsInputChar Char. Determines if a character is an input character that the control recognizes. IsInputKey Keys. LogicalToDeviceUnits Int LogicalToDeviceUnits Size. MemberwiseClone Boolean. NotifyInvalidate Rectangle. OnClick EventArgs. OnCursorChanged EventArgs. OnDockChanged EventArgs. OnDoubleClick EventArgs. OnDragLeave EventArgs.
OnEnabledChanged EventArgs. OnEnter EventArgs. OnFontChanged EventArgs. OnGotFocus EventArgs. OnHandleCreated EventArgs. OnHandleDestroyed EventArgs. OnInvalidated InvalidateEventArgs. OnLayout LayoutEventArgs. OnLeave EventArgs. OnLocationChanged EventArgs. OnLostFocus EventArgs. OnMarginChanged EventArgs. OnModifiedChanged EventArgs. OnMouseEnter EventArgs. OnMouseHover EventArgs. OnMouseLeave EventArgs. OnMove EventArgs. OnMultilineChanged EventArgs.
OnNotifyMessage Message. Notifies the control of Windows messages. OnPaddingChanged EventArgs. OnPaint PaintEventArgs. Paints the background of the control. OnParentChanged EventArgs. OnPrint PaintEventArgs. OnRegionChanged EventArgs. OnResize EventArgs. OnSizeChanged EventArgs. OnStyleChanged EventArgs. OnTextChanged EventArgs. OnValidated EventArgs.
OnValidating CancelEventArgs. OnVisibleChanged EventArgs. Forces the control to apply layout logic to all its child controls. PerformLayout Control, String. PointToClient Point. Computes the location of the specified screen point into client coordinates. PointToScreen Point. Computes the location of the specified client point into screen coordinates. PreProcessControlMessage Message. Preprocesses keyboard or input messages within the message loop before they are dispatched.
PreProcessMessage Message. ProcessCmdKey Message, Keys. Processes a command key. ProcessDialogChar Char. Processes a dialog character. ProcessDialogKey Keys.
ProcessKeyEventArgs Message. Processes a key message and generates the appropriate control events. ProcessKeyMessage Message. Processes a keyboard message. ProcessKeyPreview Message. Previews a keyboard message.
ProcessMnemonic Char. Processes a mnemonic character. Raises the appropriate drag event. Raises the appropriate key event. Raises the appropriate mouse event. Raises the appropriate paint event. Forces the re-creation of the handle for the control. RectangleToClient Rectangle. Computes the size and location of the specified screen rectangle in client coordinates. RectangleToScreen Rectangle. Computes the size and location of the specified client rectangle in screen coordinates. Provides constants for rescaling the control when a DPI change occurs.
Resumes usual layout logic. ResumeLayout Boolean. Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests. RtlTranslateAlignment ContentAlignment. RtlTranslateAlignment HorizontalAlignment. RtlTranslateContent ContentAlignment. RtlTranslateHorizontal HorizontalAlignment. Scale Single. Scales the control and any child controls.
Scale Single, Single. Scales the entire control and any child controls. Scale SizeF. Scales the control and all child controls by the specified scaling factor. Scales a logical bitmap value to it's equivalent device unit value when a DPI change occurs. Scales a control's location, size, padding and margin.
ScaleCore Single, Single. This method is not relevant for this class. Activates the control. Select Boolean, Boolean. Select Int32, Int Activates the next control. Sends the control to the back of the z-order. Sets the bounds of the control to the specified location and size. Sets the specified bounds of the control to the specified location and size.
Sets the size of the client area of the control. SetStyle ControlStyles, Boolean. SetTopLevel Boolean. Sets the control as the top-level control. SetVisibleCore Boolean.
Sets the control to the specified visible state. Displays the control to the user. SizeFromClientSize Size. Determines the size of the entire control from the height and width of its client area. Temporarily suspends the layout logic for the control. Causes the control to redraw the invalidated regions within its client area. Updates the bounds of the control with the current size and location.
Updates the bounds of the control with the specified size and location. Updates the bounds of the control with the specified size, location, and client size. Forces the assigned styles to be reapplied to the control. Updates the control in its parent's z-order. WndProc Message. Occurs when the focus or keyboard user interface UI cues change. Occurs when the control is double-clicked. Occurs when a drag-and-drop operation is completed. Occurs when an object is dragged into the control's bounds.
Occurs when an object is dragged out of the control's bounds. Occurs when an object is dragged over the control's bounds. Occurs when the control is entered. Occurs during a drag operation. Occurs when the control receives focus. Occurs when a handle is created for the control. Occurs when the control's handle is in the process of being destroyed.
Occurs when the user requests help for a control. Occurs when a control's display requires redrawing. Occurs when a key is pressed while the control has focus. Occurs when a character. Occurs when a key is released while the control has focus. Occurs when a control should reposition its child controls.
Occurs when the input focus leaves the control. Occurs when the control loses focus. Occurs when the control's margin changes. Occurs when the control loses mouse capture. Occurs when the control is clicked by the mouse. Occurs when the control is double clicked by the mouse. Occurs when the mouse pointer is over the control and a mouse button is pressed. Occurs when the mouse pointer enters the control. Occurs when the mouse pointer rests on the control. Occurs when the mouse pointer leaves the control.
Occurs when the mouse pointer is moved over the control. Occurs when the mouse pointer is over the control and a mouse button is released. Occurs when the mouse wheel moves while the control has focus. Seems as you cannot set the hight of the textbox with one line only, it is set by the font. I hate to prove you wrong but the following code will show you that the textbox can be shown at any size we want. Just copy and run it. Office Office Exchange Server.
Not an IT pro? Sign in. United States English. Ask a question. Quick access. Search related threads. Remove From My Forums. Asked by:. Archived Forums. Windows PowerShell. Sign in to vote. Then select the field you wish to change and enter the value in the fields below. This event is not relevant for this class. Occurs when the value of the BindingContext property changes.
Occurs when the value of the BorderStyle property has changed. Occurs when the value of the CausesValidation property changes. Occurs when the value of the ClientSize property changes. Occurs when the value of the ContextMenu property changes. Occurs when the value of the ContextMenuStrip property changes. Occurs when a new control is added to the Control. Occurs when a control is removed from the Control. Occurs when the value of the Cursor property changes.
Occurs when the component is disposed by a call to the Dispose method. Occurs when the value of the Dock property changes. Occurs when the user double-clicks the RichTextBox control. Occurs when the DPI setting for a control is changed programmatically after the DPI of its parent control or form has changed. Occurs when the DPI setting for a control is changed programmatically before a DPI change event for its parent control or form has occurred.
Occurs when the Enabled property value has changed. Occurs when the Font property value changes. Occurs when the ForeColor property value changes. Occurs when the value of the HideSelection property has changed. Occurs when the ImeMode property has changed. Occurs when the Location property value has changed. Occurs when the value of the Modified property has changed. Occurs when the value of the Multiline property has changed. Occurs when the Parent property value changes.
Occurs before the KeyDown event when a key is pressed while focus is on this control. Occurs when AccessibleObject is providing help to accessibility applications. Occurs when the value of the ReadOnly property has changed. Occurs when the value of the Region property changes. Occurs when the RightToLeft property value changes. Occurs when the Size property value changes. Occurs when the TabIndex property value changes. Occurs when the TabStop property value changes.
Occurs when the Text property value changes. Occurs when the Visible property value changes. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info.
Contents Exit focus mode. Please rate your experience Yes No. Any additional feedback? Namespace: System. Forms Assembly: System.
Represents a Windows rich text box control. Note The TextBoxBase. In this article. Inherited from TextBoxBase. Inherited from Control. Gets or sets the description of the control used by accessibility client applications. Gets or sets the name of the control used by accessibility client applications.
Gets or sets the accessible role of the control. Gets or sets a value indicating whether the control will enable drag-and-drop operations.
Gets or sets a value indicating whether automatic word selection is enabled. Gets or sets the background color of the control. Gets or sets the border type of the text box control. Gets a value indicating whether the control can receive focus.
Determines if events can be raised on the control. Gets a value indicating whether the control can be selected. Gets a value indicating whether the user can undo the previous operation in a text box control. Gets or sets a value indicating whether the control has captured the mouse. Gets the rectangle that represents the client area of the control. Gets or sets the height and width of the client area of the control. Gets the name of the company or creator of the application containing the control.
Inherited from Component. Gets or sets the shortcut menu associated with the control. Gets the collection of controls contained within the control. Gets a value indicating whether the control has been created. Gets the required creation parameters when the control handle is created. Gets or sets the cursor that is displayed when the mouse pointer is over the control. Gets the data bindings for the control.
Gets or sets the default cursor for the control. Gets the space, in pixels, that is specified by default between controls. Gets the internal spacing, in pixels, of the contents of a control. Gets the DPI value for the display device where the control is currently being displayed. Gets the rectangle that represents the display area of the control.
Gets or sets a value that enables drag-and-drop operations on text, pictures, and other data. Gets or sets a value indicating whether the control can respond to user interaction. Gets a value indicating whether the control has input focus. Gets or sets the height of the font of the control.
Gets the window handle that the control is bound to. Gets a value indicating whether the control contains one or more child controls. Gets or sets the height of the control. Gets or sets a value indicating whether the control is visible to accessibility applications.
Gets a value indicating whether the control has been disposed of. Gets a value indicating whether the control has a handle associated with it. Gets a value indicating whether the control is mirrored.
Gets a cached instance of the control's layout engine. Gets or sets the lines of text in a text box control. Gets or sets the space between controls. Gets or sets the name of the control. Gets or sets the parent container of the control.
Gets the preferred height for a text box. Gets the size of a rectangular area into which the control can fit.
Gets the product name of the assembly containing the control. Gets the version of the assembly containing the control. Gets or sets a value indicating whether text in the text box is read-only. Gets a value indicating whether the control is currently re-creating its handle. Gets or sets the window region associated with the control. This property is now obsolete. Gets or sets a value indicating whether the control redraws itself when resized.
Gets a value that determines the scaling of child controls. Gets or sets the currently selected rich text format RTF formatted text in the control. Gets or sets the alignment to apply to the current selection or insertion point. Gets or sets the text color of the current text selection or insertion point.
Gets or sets the font of the current text selection or insertion point. Gets or sets the length, in pixels, of the indentation of the line where the selection starts.
Gets or sets a value indicating whether the current text selection is protected. Gets or sets the starting point of text selected in the text box. Gets or sets a value indicating whether the defined shortcuts are enabled.
Gets a value indicating whether the control should display focus rectangles. Gets or sets the site of the control. Gets or sets the height and width of the control. Gets or sets the tab order of the control within its container. Gets or sets the object that contains data about the control.
Gets or sets a value indicating whether the control and all its child controls are displayed. Gets or sets the width of the control. AppendText String. Appends text to the current text of a text box.
BeginInvoke Action. BeginInvoke Delegate. BeginInvoke Delegate, Object[]. Brings the control to the front of the z-order. Determines whether you can paste information from the Clipboard in the specified data format. Clears all text from the text box control. Clears information about the most recent operation from the undo buffer of the text box. Contains Control. Retrieves a value indicating whether the specified control is a child of the control. Copies the current selection in the text box to the Clipboard.
Creates a new instance of the control collection for the control. Creates a handle for the control. CreateObjRef Type. Inherited from MarshalByRefObject. Moves the current selection in the text box to the Clipboard. DefWndProc Message. Sends the specified message to the default window procedure. Destroys the handle associated with the control.
Dispose Boolean. Begins a drag-and-drop operation. DrawToBitmap Bitmap, Rectangle. Supports rendering to the specified bitmap. EndInvoke IAsyncResult. Equals Object. Determines whether the specified object is equal to the current object.
Inherited from Object. Find Char[]. Find Char[], Int Find Char[], Int32, Int Find String. Retrieves the form that the control is on. Sets input focus to the control. GetCharFromPosition Point.
Retrieves the character that is closest to the specified location within the control. Retrieves the index of the character nearest to the specified location. GetChildAtPoint Point. Retrieves the child control that is located at the specified coordinates. Retrieves the index of the first character of a given line. Retrieves the index of the first character of the current line.
Serves as the default hash function. GetNextControl Control, Boolean. Retrieves the next control forward or back in the tab order of child controls. Retrieves the location within the control at the specified character index. GetPreferredSize Size. Retrieves the size of a rectangular area into which a control can be fitted. Retrieves the bounds within which the control is scaled. GetService Type. GetStyle ControlStyles.
Retrieves the value of the specified control style bit for the control. Determines if the control is a top-level control. Conceals the control from the user. Obtains a lifetime service object to control the lifetime policy for this instance. Called after the control has been added to another container. Invalidates the entire surface of the control and causes the control to be redrawn. Invalidate Boolean. Invalidate Rectangle. Invalidate Rectangle, Boolean. Invalidate Region. Invalidate Region, Boolean.
Invoke Action. Executes the specified delegate on the thread that owns the control's underlying window handle. Invoke Delegate. Invoke Delegate, Object[]. IsInputChar Char. Determines if a character is an input character that the control recognizes.
IsInputKey Keys. LoadFile String. LogicalToDeviceUnits Int LogicalToDeviceUnits Size. MemberwiseClone Boolean. NotifyInvalidate Rectangle. OnClick EventArgs. OnCursorChanged EventArgs. OnDockChanged EventArgs. OnDoubleClick EventArgs. OnDragLeave EventArgs. OnEnabledChanged EventArgs. OnEnter EventArgs. OnFontChanged EventArgs. OnGotFocus EventArgs.
OnHandleCreated EventArgs.
0コメント