Table of Contents

Class ExMaskedTextBox

Namespace
ExControls
Assembly
ExControls.dll

Extended MaskedTextBox 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.

[ToolboxBitmap(typeof(ToolboxIcons), "Toolbox.ExMaskedTextBox.ico")]
public class ExMaskedTextBox : MaskedTextBox, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IExControl, IThemeable
Inheritance
ExMaskedTextBox
Implements
Inherited Members
Extension Methods

Constructors

ExMaskedTextBox()

Initializes a new instance of the ExMaskedTextBox class in the default style.

public ExMaskedTextBox()

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

Color

BorderThickness

Width of the TextBox's border

[Browsable(true)]
[ExCategory(CategoryType.Appearance)]
[ExDescription("Width of the TabControl's border.")]
public int BorderThickness { get; set; }

Property Value

int

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

bool

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

Color

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

Color

Methods

ApplyTheme(ExTheme)

Sets the colors and appearance of the control by the theme.

public void ApplyTheme(ExTheme theme)

Parameters

theme ExTheme

OnCreateControl()

Raises the CreateControl() method.

protected override void OnCreateControl()

OnDefaultStyleChanged()

Raises the DefaultStyleChanged event.

protected virtual void OnDefaultStyleChanged()

OnEnter(EventArgs)

Raises the Enter event.

protected override void OnEnter(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnGotFocus(EventArgs)

protected override void OnGotFocus(EventArgs e)

Parameters

e EventArgs

OnLeave(EventArgs)

Raises the Leave event.

protected override void OnLeave(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnLostFocus(EventArgs)

Raises the LostFocus event.

protected override void OnLostFocus(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnMouseEnter(EventArgs)

Raises the MouseEnter event.

protected override void OnMouseEnter(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnMouseLeave(EventArgs)

Raises the MouseLeave event.

protected override void OnMouseLeave(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

WndProc(ref Message)

Processes Windows messages.

protected override void WndProc(ref Message m)

Parameters

m Message

The Windows Message to process.

Events

DefaultStyleChanged

Occurs when the DefaultStyle property changes.

[ExCategory("Changed Property")]
[ExDescription("Occurs when the BorderColor property changes.")]
public event EventHandler? DefaultStyleChanged

Event Type

EventHandler