The SftMask.DefaultText property defines a text that is entered into the control when it is empty, so a field the user clears returns to a sensible value, such as a quantity of 1 or the local area code of a phone number. The text is typed into the mask as the user would type it, so it is entered the same way in every culture as long as it uses no separators.
The SftMask.DefaultHandling property defines when the default text is entered:
| Value | Description |
|---|---|
| DefaultHandlingEnum.Delayed | When the input focus moves on to another control while the control is empty. This is the default. |
| DefaultHandlingEnum.Immediate | As soon as a change by the user leaves the control empty. |
The default text is not entered when the control is created. The SftMask.ApplyDefaultText method enters it if the control is empty, for example after a form is loaded or reset, and returns whether it did.
C#
sftMask1.Mask = "$I^N4(1,9999)"; sftMask1.DefaultText = "1"; sftMask1.ApplyDefaultText();
VB
SftMask1.Mask = "$I^N4(1,9999)" SftMask1.DefaultText = "1" SftMask1.ApplyDefaultText()