ConfigureCellMaskedTextBox

Top  Previous  Next

Specifies the attributes of a MaskedTextBox column for the grid in edit mode.

[Visual Basic .NET]

Public Function ConfigureCellMaskedTextBox(ByVal SectionIndex As Integer,

                                                                   ByVal ColumnIndex As Integer,

                                                                   ByVal AllowPromptAsInput As Boolean,

                                                                   ByVal CutCopyMaskFormat As MaskFormat,

                                                                   ByVal HidePromptOnLeave As Boolean,

                                                                   ByVal HideSelection As Boolean,

                                                                   ByVal Mask As String,

                                                                   ByVal PasswordChar As Char,

                                                                   ByVal PromptChar As Char,

                                                                   ByVal RejectInputOnFirstFailure As Boolean,

                                                                   ByVal ResetOnPrompt As Boolean,

                                                                   ByVal ResetOnSpace As Boolean,

                                                                   ByVal RTL As RightToLeft,

                                                                   ByVal TextAlign As HorizontalAlignment,

                                                                   ByVal TextMaskFormat As MaskFormat,

                                                                   ByVal UseSystemPasswordChar As Boolean) As Boolean

[C#]

public bool ConfigureCellMaskedTextBox(int SectionIndex,

                                                           int ColumnIndex,

                                                           bool AllowPromptAsInput,

                                                           MaskFormat CutCopyMaskFormat,

                                                           bool HidePromptOnLeave,

                                                           bool HideSelection,

                                                           string Mask,

                                                           char PasswordChar,

                                                           char PromptChar,

                                                           bool RejectInputOnFirstFailure,

                                                           bool ResetOnPrompt,

                                                           bool ResetOnSpace,

                                                           RightToLeft RTL,

                                                           HorizontalAlignment TextAlign,

                                                           MaskFormat TextMaskFormat,

                                                           bool UseSystemPasswordChar);

Parameters

SectionIndex

Specifies the index (0-based) of the section in which configuring occurs. If the AllowSections is set to FALSE, this parameter becomes irrelevant. If it is set to TRUE, your code can set this parameter to -1 to let configuring take effect for all sections.

ColumnIndex

Specifies the index (0-based) of the column.

AllowPromptAsInput

Indicates whether PromptChar can be entered as valid data by the user, and the recommended value is TRUE.

CutCopyMaskFormat

Indicates whether the literals and prompt characters are copied to the clipboard, and the recommended value is IncludeLiterals.

HidePromptOnLeave

Indicates whether the prompt characters in the input mask are invisible when the control loses the focus, and the recommended value is FALSE.

HideSelection

Indicates whether the selected text becomes hidden when the control loses the focus, and the recommended value is TRUE.

Mask

Specifies the input mask.

PasswordChar

Specifies the character to be displayed in substitute when keying in a password.

PromptChar

Indicates the character used to prompt the user for input, and the recommended value underscore character "_".

RejectInputOnFirstFailure

Indicates whether the input should be terminated after the first invalid character is detected, and the recommended value is FALSE.

ResetOnPrompt

Indicates whether the prompt character entered as input causes the current editable position in the mask to be reset or not, and the recommended value is TRUE

ResetOnSpace

Indicates whether the space entered as input causes the current editable position in the mask to be reset, and the recommended value is TRUE.

RTL

Indicates whether control's elements are aligned to support locales using right-to-left fonts, and the recommended value is Inherit.

TextAlign

Indicates how text is aligned in the control.

TextMaskFormat

Indicates whether the literals and prompt characters are included in the formatted string, and the recommended value is IncludeLiterals.

UseSystemPasswordChar

Indicates whether the system password should be used as the prompt character, and the recommended value is FALSE.

 

Return Value:

If the operation is successful, it returns TRUE; otherwise it returns FALSE.