Class ExTextBox
- Namespace
- ExControls
- Assembly
- ExControls.dll
Extended TextBox control: in the custom style it draws the border with its own color and thickness, highlighted when the control has focus or is under the mouse, and uses its own colors when disabled; it can show a hint text and dark scroll bars.
[ToolboxBitmap(typeof(ToolboxIcons), "Toolbox.ExTextBox.ico")]
public class ExTextBox : TextBox, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IExControl, IThemeable
- Inheritance
-
ExTextBox
- Implements
- Inherited Members
- Extension Methods
Constructors
ExTextBox()
Initializes a new instance of the ExTextBox class in the default style.
public ExTextBox()
Properties
BorderColor
Color of the TextBox's border.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Color of the TextBox's border.")]
public Color BorderColor { get; set; }
Property Value
BorderThickness
Width of the TextBox's border.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Width of the TextBox's border.")]
public int BorderThickness { get; set; }
Property Value
DefaultStyle
Gets or sets whether the control uses the default Windows style; false = the custom style drawn by the control with its own colors.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Default style of the Control.")]
public bool DefaultStyle { get; set; }
Property Value
DisabledBackColor
Background color of the TextBox when it is disabled.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Background color of the TextBox's when it is disabled.")]
public Color DisabledBackColor { get; set; }
Property Value
DisabledBorderColor
Color of the TextBox's border when it is disabled.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Color of the TextBox's border when it is disabled.")]
public Color DisabledBorderColor { get; set; }
Property Value
DisabledForeColor
Foreground color of the TextBox when it is disabled.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Foreground color of the TextBox's when it is disabled.")]
public Color DisabledForeColor { get; set; }
Property Value
HighlightColor
Color of the border of TextBox when mouse is over the Control.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Color of the border of TextBox when mouse is over the Control.")]
public Color HighlightColor { get; set; }
Property Value
HintForeColor
TextBox hint foreground color.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("TextBox hint foreground color.")]
public Color HintForeColor { get; set; }
Property Value
HintText
Hint text for TextBox.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Hint text for TextBox.")]
public string? HintText { get; set; }
Property Value
UseDarkScrollBar
Use dark (DarkMode_Explorer) scroll bars for the multiline TextBox.
[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Use dark (DarkMode_Explorer) scroll bars.")]
public bool UseDarkScrollBar { get; set; }
Property Value
Methods
ApplyTheme(ExTheme)
Sets the colors and appearance of the control by the theme.
public void ApplyTheme(ExTheme theme)
Parameters
themeExTheme
DrawHint(Graphics)
Draws the hint text when the text box is empty and does not have focus.
protected virtual void DrawHint(Graphics g)
Parameters
gGraphicsThe graphics to draw on.
OnCreateControl()
Raises the CreateControl() method.
protected override void OnCreateControl()
OnDefaultStyleChanged()
Raises the DefaultStyleChanged event.
protected virtual void OnDefaultStyleChanged()
OnEnabledChanged(EventArgs)
Raises the EnabledChanged event.
protected override void OnEnabledChanged(EventArgs e)
Parameters
OnEnter(EventArgs)
Raises the Enter event.
protected override void OnEnter(EventArgs e)
Parameters
OnGotFocus(EventArgs)
Raises the GotFocus event.
protected override void OnGotFocus(EventArgs e)
Parameters
OnHandleCreated(EventArgs)
Raises the HandleCreated event.
protected override void OnHandleCreated(EventArgs e)
Parameters
eEventArgsThe event data.
OnLeave(EventArgs)
Raises the Leave event.
protected override void OnLeave(EventArgs e)
Parameters
OnLostFocus(EventArgs)
Raises the LostFocus event.
protected override void OnLostFocus(EventArgs e)
Parameters
OnMouseEnter(EventArgs)
Raises the MouseEnter event.
protected override void OnMouseEnter(EventArgs e)
Parameters
OnMouseLeave(EventArgs)
Raises the MouseLeave event.
protected override void OnMouseLeave(EventArgs e)
Parameters
OnPaint(PaintEventArgs)
Raises the Paint event.
protected override void OnPaint(PaintEventArgs e)
Parameters
ePaintEventArgsA PaintEventArgs that contains the event data.
WndProc(ref Message)
Processes Windows messages.
protected override void WndProc(ref Message m)
Parameters
mMessageA Windows Message object.
Events
DefaultStyleChanged
Occurs when the DefaultStyle property changes.
[ExCategory("Changed Property")]
[ExDescription("Occurs when the BorderColor property changes.")]
public event EventHandler? DefaultStyleChanged