IBindingMaskEdit.AutoSelectDefined

Syntax

AutoSelectDefined: Boolean;

Description

The AutoSelectDefined property determines whether the AUTOSELECT parameter is present in binding string.

Comments

If the AutoSelectDefined property is set to True, the binding string describing the value editor contains the AUTOSELECT parameter. The parameter value is determined by the AutoSelect property.

Example

Sub MaskEditBindingInfo(SourceBinding: String);
Var
    BM: IBindingManager;
    Binding: IBindingValue;
    MaskBoxBinding: IBindingMaskEdit;
Begin
    BM := New BindingManager.Create;
    Binding := BM.CreateByValue(SourceBinding);
    If Binding.UI = "MaskEdit" Then
        MaskBoxBinding := Binding As IBindingMaskEdit;
        //Check if the AUTOSELECT parameter is present
        If MaskBoxBinding.AutoSelectDefined Then
            Debug.WriteLine("AUTOSELECT: " + MaskBoxBinding.AutoSelect.ToString);
        End If;
        //Check if the INPUTTEMPLATE parameter is present
        If MaskBoxBinding.InputTemplateDefined Then
            Debug.WriteLine("INPUTTEMPLATE: " + MaskBoxBinding.InputTemplate);
        End If;
        //Check if the MASK parameter is present
        If MaskBoxBinding.MaskDefined Then
            Debug.WriteLine("MASK: " + MaskBoxBinding.Mask);
        End If;
        //Check if the MAXLENGTH parameter is present
        If MaskBoxBinding.MaxLengthDefined Then
            Debug.WriteLine("MAXLENGTH: " + MaskBoxBinding.MaxLength.ToString);
        End If;
        //Check if the VALIDCHARS parameter is present
        If MaskBoxBinding.ValidCharsDefined Then
            Debug.WriteLine("VALIDCHARS: " + MaskBoxBinding.ValidChars);
        End If;
    End If;
End Sub MaskEditBindingInfo;

This function checks the binding string passed as the SourceBinding input parameter. If the binding string corresponds to the value editor by mask, values of parameters will be displayed in the development environment console.

See also:

IBindingMaskEdit