skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class 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.

Inheritance
System.Object
HostedTextBoxBase
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

public class HostedTextBoxBase : TextBox

Constructors

HostedTextBoxBase()

Declaration
public HostedTextBoxBase()

Properties

Multiline

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

Declaration
public override bool Multiline { get; set; }
Property Value
System.Boolean

NullText

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

Declaration
public string NullText { get; set; }
Property Value
System.String

NullTextColor

Gets or sets a color of the null text.

Declaration
public Color NullTextColor { get; set; }
Property Value
System.Drawing.Color

PromptForeColor

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

Declaration
public Color PromptForeColor { get; set; }
Property Value
System.Drawing.Color

ShowNullText

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

Declaration
public bool ShowNullText { get; set; }
Property Value
System.Boolean

UseGenericBorderPaint

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

Declaration
public bool UseGenericBorderPaint { get; set; }
Property Value
System.Boolean

Methods

DrawNullText(Graphics)

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

Declaration
protected virtual void DrawNullText(Graphics graphics)
Parameters
System.Drawing.Graphics graphics

DrawTextPrompt()

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

Declaration
protected virtual void DrawTextPrompt()
Remarks

The Graphics region is disposed after drawing the prompt.

OnPaint(PaintEventArgs)

Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
System.Windows.Forms.PaintEventArgs e

OnParentChanged(EventArgs)

Declaration
protected override void OnParentChanged(EventArgs e)
Parameters
System.EventArgs e

OnTextAlignChanged(EventArgs)

Declaration
protected override void OnTextAlignChanged(EventArgs e)
Parameters
System.EventArgs e

PaintBorders(PaintEventArgs)

Declaration
protected void PaintBorders(PaintEventArgs e)
Parameters
System.Windows.Forms.PaintEventArgs e

PaintBordersCore(Graphics, Rectangle)

Declaration
protected void PaintBordersCore(Graphics graphics, Rectangle windowRectangle)
Parameters
System.Drawing.Graphics graphics

System.Drawing.Rectangle windowRectangle

ResetNullText()

Resets the null text to an empty string.

Declaration
public void ResetNullText()

ShouldSerializeNullText()

Returns a value indicating whether the NullText should be serialized.

Declaration
public bool ShouldSerializeNullText()
Returns
System.Boolean

Whether to serialize the null text.

WndProc(ref Message)

Declaration
protected override void WndProc(ref Message message)
Parameters
System.Windows.Forms.Message message

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.