Defines the contents of the control.
Class: SftMask
Namespace: Softelvdm.SftMaskNET
Assembly: Softelvdm.SftMaskNET
public override string Text { get; set; }
Public Overrides Property Text As StringThe contents in the form defined by the SftMask.TextFormat property.
Defines the contents of the control.
Setting a text types its characters into the mask; characters that do not fit are left out and raise the SftMask.InputRejected event. A space or the prompt character leaves an input position empty. Setting the text raises the TextChanged event; it does not set the SftMask.Modified property.
private SftMask[] fields;
public Form1() {
InitializeComponent();
fields = new SftMask[] { sftMaskPhone, sftMaskZip, sftMaskAmount, sftMaskPercent, sftMaskQuantity, sftMaskIP,
sftMaskColor, sftMaskKey, sftMaskPin, sftMaskCity, sftMaskFile };
sftMaskPhone.Text = "4079045200";
sftMaskZip.Text = "328011234";
sftMaskIP.Text = "192168001001";
// Numbers are set as values, so they do not depend on the culture's separators.
sftMaskAmount.Value = 1234.5m;
sftMaskPercent.Value = 25;
sftMaskQuantity.Value = 10;
sftMaskColor.Value = 0x2E8B57;
Private fields() As SftMask
Public Sub New()
InitializeComponent()
fields = New SftMask() {SftMaskPhone, SftMaskZip, SftMaskAmount, SftMaskPercent, SftMaskQuantity, SftMaskIP,
SftMaskColor, SftMaskKey, SftMaskPin, SftMaskCity, SftMaskFile}
SftMaskPhone.Text = "4079045200"
SftMaskZip.Text = "328011234"
SftMaskIP.Text = "192168001001"
' Numbers are set as values, so they do not depend on the culture's separators.
SftMaskAmount.Value = 1234.5D
SftMaskPercent.Value = 25
SftMaskQuantity.Value = 10
SftMaskColor.Value = &H2E8B57
See Also SftMask Class | Classes | SftMask/NET 3.0