New to Telerik UI for WinFormsStart a free 30-day trial

The TextBox control that is hosted by default by RadTextBoxItem. Children of this class can be passed to RadTextBoxItem in order to customize the hosted text box.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class HostedTextBoxBase : TextBox, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable

Inheritance: objectMarshalByRefObjectComponentControlTextBoxBaseTextBoxHostedTextBoxBase...

Implements: IBindableComponentIComponentIDisposableIDropTargetISynchronizeInvokeIWin32Window...

Inherited Members TextBox.Dispose(bool)TextBox.IsInputKey(Keys)TextBox.OnBackColorChanged(EventArgs)TextBox.OnFontChanged(EventArgs)TextBox.OnGotFocus(EventArgs)TextBox.OnHandleCreated(EventArgs)TextBox.OnHandleDestroyed(EventArgs)TextBox.ProcessCmdKey(ref Message, Keys)TextBox.Paste(string)TextBox.AcceptsReturnTextBox.AutoCompleteModeTextBox.AutoCompleteSourceTextBox.AutoCompleteCustomSourceTextBox.CharacterCasingTextBox.CreateParamsTextBox.PasswordCharTextBox.ScrollBarsTextBox.TextTextBox.TextAlignTextBox.UseSystemPasswordCharTextBox.TextAlignChangedTextBoxBase.AppendText(string)TextBoxBase.Clear()TextBoxBase.ClearUndo()TextBoxBase.Copy()TextBoxBase.CreateHandle()TextBoxBase.Cut()TextBoxBase.Paste()TextBoxBase.ProcessDialogKey(Keys)TextBoxBase.OnAcceptsTabChanged(EventArgs)TextBoxBase.OnBorderStyleChanged(EventArgs)TextBoxBase.OnHideSelectionChanged(EventArgs)TextBoxBase.OnModifiedChanged(EventArgs)TextBoxBase.OnMouseUp(MouseEventArgs)TextBoxBase.OnMultilineChanged(EventArgs)TextBoxBase.OnPaddingChanged(EventArgs)TextBoxBase.OnReadOnlyChanged(EventArgs)TextBoxBase.OnTextChanged(EventArgs)TextBoxBase.GetCharFromPosition(Point)TextBoxBase.GetCharIndexFromPosition(Point)TextBoxBase.GetLineFromCharIndex(int)TextBoxBase.GetPositionFromCharIndex(int)TextBoxBase.GetFirstCharIndexFromLine(int)TextBoxBase.GetFirstCharIndexOfCurrentLine()TextBoxBase.ScrollToCaret()TextBoxBase.DeselectAll()TextBoxBase.Select(int, int)TextBoxBase.SelectAll()TextBoxBase.SetBoundsCore(int, int, int, int, BoundsSpecified)TextBoxBase.ToString()TextBoxBase.Undo()TextBoxBase.AcceptsTabTextBoxBase.ShortcutsEnabledTextBoxBase.BackColorTextBoxBase.BorderStyleTextBoxBase.CanEnableImeTextBoxBase.CanUndoTextBoxBase.DefaultCursorTextBoxBase.DefaultSizeTextBoxBase.ForeColorTextBoxBase.HideSelectionTextBoxBase.ImeModeBaseTextBoxBase.LinesTextBoxBase.MaxLengthTextBoxBase.ModifiedTextBoxBase.PreferredHeightTextBoxBase.ReadOnlyTextBoxBase.SelectedTextTextBoxBase.SelectionLengthTextBoxBase.SelectionStartTextBoxBase.TextLengthTextBoxBase.WordWrapTextBoxBase.AcceptsTabChangedTextBoxBase.BorderStyleChangedTextBoxBase.ClickTextBoxBase.MouseClickTextBoxBase.HideSelectionChangedTextBoxBase.ModifiedChangedTextBoxBase.MultilineChangedTextBoxBase.ReadOnlyChanged...

Constructors

C#
public HostedTextBoxBase()

Properties

Controls whether the text of the edit control can span more than one line.

C#
public override bool Multiline { get; set; }

Overrides: TextBox.Multiline

Gets or sets the prompt text that is displayed when the TextBox contains no text.

C#
[Browsable(true)]
public string NullText { get; set; }

Gets or sets a color of the null text.

C#
[Browsable(false)]
public Color NullTextColor { get; set; }

Gets or sets whether to use different than SystemColors.GrayText color for the prompt text.

C#
[Browsable(true)]
public Color PromptForeColor { get; set; }

Gets or sets a value indicating whether the null text will be shown when the control is focused and the text is empty.

C#
[Browsable(false)]
public bool ShowNullText { get; set; }

Gets or sets a value indicating whether to show the bottom part of characters, clipped due to font name or size particularities.

C#
[Browsable(false)]
public bool UseGenericBorderPaint { get; set; }

Methods

Draws the NullText in the client area of the TextBox using the default font and color.

C#
protected virtual void DrawNullText(Graphics graphics)
Parameters:graphicsGraphics

Overload to automatically create the Graphics region before drawing the text prompt

C#
protected virtual void DrawTextPrompt()
Remarks:

The Graphics region is disposed after drawing the prompt.

C#
protected override void OnPaint(PaintEventArgs e)
Parameters:ePaintEventArgs

Overrides: Control.OnPaint(PaintEventArgs)

C#
protected override void OnParentChanged(EventArgs e)
Parameters:eEventArgs

Overrides: Control.OnParentChanged(EventArgs)

C#
protected override void OnTextAlignChanged(EventArgs e)
Parameters:eEventArgs

Overrides: TextBox.OnTextAlignChanged(EventArgs)

C#
protected void PaintBorders(PaintEventArgs e)
Parameters:ePaintEventArgs
C#
protected void PaintBordersCore(Graphics graphics, Rectangle windowRectangle)
Parameters:graphicsGraphicswindowRectangleRectangle

Resets the null text to an empty string.

C#
public void ResetNullText()

Returns a value indicating whether the NullText should be serialized.

C#
public bool ShouldSerializeNullText()
Returns:

bool

Whether to serialize the null text.

C#
protected override void WndProc(ref Message message)
Parameters:messageMessage

Overrides: TextBox.WndProc(ref Message)