Show / Hide Table of Contents

Class HintTextBox

A special TextBox that displays a HintText when Text is empty and a clear button when it is not.

Inheritance
Object
HintTextBox
UriTextBox
Namespace: NanoByte.Common.Controls
Assembly: NanoByte.Common.WinForms.dll
Syntax
public class HintTextBox : TextBox

Constructors

HintTextBox()

Declaration
public HintTextBox()

Properties

ForeColor

Gets or sets the color used when displaying text in the control.

Declaration
public Color ForeColor { get; set; }
Property Value
Type Description
Color

HintText

A text to be displayed in GrayText when Text is empty.

Declaration
public string HintText { get; set; }
Property Value
Type Description
String

IsHintTextVisible

Indicates whether the HintText is currently visible.

Declaration
public bool IsHintTextVisible { get; }
Property Value
Type Description
Boolean

ShowClearButton

Controls whether the clear button is shown. Remains invisible when the HintText is visible.

Declaration
public bool ShowClearButton { get; set; }
Property Value
Type Description
Boolean

Text

Declaration
public override string Text { get; set; }
Property Value
Type Description
String

Methods

OnBackColorChanged(EventArgs)

Declaration
protected override void OnBackColorChanged(EventArgs e)
Parameters
Type Name Description
EventArgs e

OnClearButtonClicked(EventArgs)

Raises the ClearButtonClicked event.

Declaration
protected virtual void OnClearButtonClicked(EventArgs e)
Parameters
Type Name Description
EventArgs e

OnEnter(EventArgs)

Declaration
protected override void OnEnter(EventArgs e)
Parameters
Type Name Description
EventArgs e

OnLeave(EventArgs)

Declaration
protected override void OnLeave(EventArgs e)
Parameters
Type Name Description
EventArgs e

OnTextChanged(EventArgs)

Declaration
protected override void OnTextChanged(EventArgs e)
Parameters
Type Name Description
EventArgs e

Events

ClearButtonClicked

Occurs when the clear button is clicked.

Declaration
public event EventHandler ClearButtonClicked
Event Type
Type Description
EventHandler

Extension Methods

UpdateUtils.To<TIn, TOut>(TIn, Func<TIn, TOut>)
JsonStorage.SaveJson<T>(T, Stream)
JsonStorage.SaveJson<T>(T, String)
JsonStorage.ToJsonString<T>(T)
JsonStorage.ReparseAsJson<T>(Object)
JsonStorage.ReparseAsJson<T>(Object, T)
XmlStorage.SaveXml(Object, Stream, String)
XmlStorage.SaveXml<T>(T, String, String)
XmlStorage.ToXmlString(Object, String)
ConversionUtils.ConvertToString<TType>(TType)
In This Article
Back to top Copyright Bastian Eicher