HostedTextBoxBase
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:
public class HostedTextBoxBase : TextBox, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable
Inheritance: objectMarshalByRefObjectComponentControlTextBoxBaseTextBoxHostedTextBoxBase...
Implements:
Inherited Members
Constructors
public HostedTextBoxBase()
Properties
Gets or sets whether the hosted text box can display and edit multiple lines. Generic border painting is used only when this is false.
public override bool Multiline { get; set; }
Overrides:
Gets or sets the prompt text that is displayed when the TextBox contains no text.
[Browsable(true)]
public string NullText { get; set; }
Gets or sets a color of the null text.
[Browsable(false)]
public Color NullTextColor { get; set; }
Gets or sets whether to use different than SystemColors.GrayText color for the prompt text.
[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.
[Browsable(false)]
public bool ShowNullText { get; set; }
Gets or sets whether a generic border is painted for single-line hosted text boxes.
[Browsable(false)]
public bool UseGenericBorderPaint { get; set; }
Methods
Draws the NullText in the client area of the TextBox using the default font and color.
Overload to automatically create the Graphics region before drawing the text prompt
protected virtual void DrawTextPrompt()
The Graphics region is disposed after drawing the prompt.
Draws the empty-text prompt when it is allowed by the current focus state or ShowNullText.
protected override void OnPaint(PaintEventArgs e)
The paint event data.
Overrides:
Recreates the native handle after the hosted text box is reparented.
protected override void OnParentChanged(EventArgs e)
The parent-change event data.
Overrides:
Invalidates the hosted text box so its text and any empty-text prompt are redrawn after alignment changes.
protected override void OnTextAlignChanged(EventArgs e)
The text-alignment change event data.
Overrides:
Restricts border painting to the outer two-pixel strips before drawing with PaintBordersCore(Graphics, Rectangle).
Fills the specified window rectangle with the hosted text box's background color, respecting the graphics clip.
Resets the null text to an empty string.
public void ResetNullText()
Returns a value indicating whether the NullText should be serialized.
Synchronizes an inherited accessible name, tracks focus for prompt visibility, draws the native-paint prompt, and handles generic single-line borders.
protected override void WndProc(ref Message message)
The window message received by the hosted text box.
Overrides: