HeaderPane
Main
Hide
Share Link
Print

ShowPromptNoFocus Property, SftMask Class

Defines whether the prompt characters are also shown while the control does not have the input focus.

Class: SftMask
Namespace: Softelvdm.SftMaskNET
Assembly: Softelvdm.SftMaskNET

Syntax

public bool ShowPromptNoFocus { get; set; }
Public Property ShowPromptNoFocus As Boolean

Value

True to show the prompt characters at all times, False to show empty positions as blanks while the control does not have the input focus.

The default value is False.

Comments

Defines whether the prompt characters are also shown while the control does not have the input focus.

Examples

C# View entire sample code

        private void comboPrompt_SelectedIndexChanged(object sender, EventArgs e) {
            char prompt = comboPrompt.SelectedIndex == 0 ? ' ' : ((string)comboPrompt.SelectedItem)[0];
            foreach (SftMask field in fields)
                field.PromptChar = prompt;
        }

        private void checkPromptNoFocus_CheckedChanged(object sender, EventArgs e) {
            foreach (SftMask field in fields)
                field.ShowPromptNoFocus = checkPromptNoFocus.Checked;
        }

        private void checkUnderline_CheckedChanged(object sender, EventArgs e) {
            foreach (SftMask field in fields)
                field.PromptUnderline = checkUnderline.Checked;
        }

VB.NET View entire sample code

        End If
        For Each field As SftMask In fields
            field.PromptChar = prompt
        Next
    End Sub

    Private Sub CheckPromptNoFocus_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles CheckPromptNoFocus.CheckedChanged
        For Each field As SftMask In fields
            field.ShowPromptNoFocus = CheckPromptNoFocus.Checked
        Next
    End Sub

    Private Sub CheckUnderline_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles CheckUnderline.CheckedChanged
        For Each field As SftMask In fields
            field.PromptUnderline = CheckUnderline.Checked
        Next

See Also SftMask Class | Classes | SftMask/NET 3.0