HeaderPane
Main
Hide
Share Link
Print

Appearance

Colors

Colors left empty follow the system colors, translated for dark mode and high contrast (see Dark Mode and High Contrast).

PropertyDescription
SftMask.BackColor, SftMask.ForeColorThe background and the input. A disabled control, and a read-only control without a background color of its own, show the background in SystemColors.Control.
SftMask.FocusBackColor, SftMask.FocusForeColorThe background and the input while the control has the input focus.
SftMask.LiteralForeColorThe literals of the mask. When it is empty, literals are shown in the color of the input.
SftMask.DisabledForeColor, SftMask.DisabledLiteralForeColorThe input and the literals while the control is disabled. An empty DisabledForeColor uses SystemColors.GrayText, an empty DisabledLiteralForeColor the DisabledForeColor property.
SftMask.SelectionBackColor, SftMask.SelectionForeColorThe selection. While the control does not have the input focus, the selection is shown only when the SftMask.HideSelection property is false.
SftMask.FocusSelectionBackColor, SftMask.FocusSelectionForeColorThe selection while the control has the input focus.
SftMask.InvalidBackColor, SftMask.InvalidForeColorThe background and the input while the contents are not valid (see Validation). They take precedence over the focus colors, and the invalid text color is also used for the literals and the label.

Border, Buttons and Size

PropertyDescription
SftMask.BorderStyleFixed3D (the default) draws the border of a Windows edit control, FixedSingle a single line in the color defined by the SftMask.BorderColor property, and None no border.
SftMask.BorderColorThe color of a FixedSingle border. When it is empty, SystemColors.ControlDark is used.
SftMask.AutoSizeThe control's height fits its font. This is the default; SftMask.PreferredHeight returns that height.
SftMask.UseThemesThe border and the buttons are drawn with the Windows visual styles (the default).
SftMask.HotTrackThe buttons are highlighted while the mouse is over them (the default).

Text

PropertyDescription
SftMask.TextAlignThe alignment of the contents and of the formatted text: left (the default), right or centered. Amounts are usually right aligned. In a right-to-left layout (RightToLeft property), left and right are swapped.
SftMask.FormattedTextA text shown instead of the contents while the control does not have the input focus, such as an amount written out in words. The contents are shown while the control has the input focus and while the mouse is over the field.
FontThe font of the contents, the label and the popups.

Prompt characters and underlines are described in Prompt Characters and Underlines, the label in Label.