MaskedTextBox
Uses a mask to distinguish between proper and improper user input.
Last updated
Was this helpful?
Uses a mask to distinguish between proper and improper user input.
Last updated
Was this helpful?
The Wisej.NET MaskedTextBox
enhances the TextBox
control with declarative input validation. The Mask
property enables specifying:
Required input characters
Optional input characters
Input type expected at each mask position (digit, alphabetic, alphanumeric)
Mask literals (characters appearing directly in the MaskedTextBox
, like hyphens in phone numbers or currency symbols)
Special character processing (e.g., converting to uppercase)
The custom mask property editor provides selection from predefined, commonly used masks.
The InvalidMessage
property sets a tooltip message for invalid entries.
The TypeValidationCompleted
event handler enables custom validation behavior.
The TextMaskFormat
property determines literal and prompt character processing in the formatted string, controlling their inclusion in the Text
property. Excluded prompt characters convert to spaces.
ExcludePromptAndLiterals
: Shows only user input text
IncludeLiterals
: Shows user input and mask literal characters
IncludePrompt
: Shows user input and prompt characters
IncludePromptAndLiterals
: Shows user input, literal characters, and prompt characters
Customize text color using the ForeColor
property.
Class name
"wisej.web.MaskedTextBox"
Theme Appearance
"textbox"
Child components
Toolcontainer state
Source code
"textfield" is the inner <input> widget. See
"editor", see