System.Windows.Forms.MaskedTextBox.ResetOnPrompt Property

Gets or sets a value that determines how an input character that matches the prompt character should be handled.

Syntax

[System.ComponentModel.DefaultValue(true)]
public bool ResetOnPrompt { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The System.Windows.Forms.MaskedTextBox can treat two categories of characters—spaces and prompt characters—specially. Typically, each input character will be tested against the mask and either accepted or rejected. Assuming that the MaskedTextBox.PromptChar property is set to non-null, then setting the MaskedTextBox.ResetOnPrompt property to true will result in special processing for the prompt character. When the user enters the prompt character into the mask, it causes the current mask character position to be cleared and the current position to be advanced to the next editable character.

MaskedTextBox.ResetOnPrompt takes precedence over the MaskedTextBox.AllowPromptAsInput property, as shown in the following table.

true

true

The prompt character can be entered and it causes the current mask position to be reset. This is the default.

true

false

The prompt character can be entered and it causes the current mask position to be reset.

false

true

The prompt character is processed as a standard input character.

false

false

The prompt character is not valid and raises a MaskedTextBox.MaskInputRejected event.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0