NanoByte.Common  2.10.5
NanoByte.Common.Controls.HintTextBox Class Reference

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

Inheritance diagram for NanoByte.Common.Controls.HintTextBox:
NanoByte.Common.Controls.UriTextBox

Protected Member Functions

override void OnEnter (EventArgs e)
 
override void OnLeave (EventArgs e)
 
override void OnTextChanged (EventArgs e)
 
override void OnBackColorChanged (EventArgs e)
 
virtual void OnClearButtonClicked (EventArgs e)
 Raises the ClearButtonClicked event. More...
 

Properties

new Color ForeColor [get, set]
 Gets or sets the color used when displaying text in the control. More...
 
override string? Text [get, set]
 
string HintText [get, set]
 A text to be displayed in SystemColors.GrayText when TextBox.Text is empty. More...
 
bool IsHintTextVisible [get]
 Indicates whether the HintText is currently visible. More...
 
bool ShowClearButton [get, set]
 Controls whether the clear button is shown. Remains invisible when the HintText is visible. More...
 

Events

EventHandler? ClearButtonClicked
 Occurs when the clear button is clicked. More...
 

Detailed Description

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

Member Function Documentation

◆ OnClearButtonClicked()

virtual void NanoByte.Common.Controls.HintTextBox.OnClearButtonClicked ( EventArgs  e)
protectedvirtual

Raises the ClearButtonClicked event.

Property Documentation

◆ ForeColor

new Color NanoByte.Common.Controls.HintTextBox.ForeColor
getset

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

◆ HintText

string NanoByte.Common.Controls.HintTextBox.HintText
getset

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

◆ IsHintTextVisible

bool NanoByte.Common.Controls.HintTextBox.IsHintTextVisible
get

Indicates whether the HintText is currently visible.

◆ ShowClearButton

bool NanoByte.Common.Controls.HintTextBox.ShowClearButton
getset

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

Event Documentation

◆ ClearButtonClicked

EventHandler? NanoByte.Common.Controls.HintTextBox.ClearButtonClicked

Occurs when the clear button is clicked.


The documentation for this class was generated from the following file: