AutoSelectDefined: Boolean;
AutoSelectDefined: Boolean;
The AutoSelectDefined property determines whether the AUTOSELECT parameter is present in binding string.
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.
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.
Imports Prognoz.Platform.Interop.ForeSystem;
Sub MaskEditBindingInfo(SourceBinding: String);
Var
BM: BindingManager = New BindingManagerClass();
Binding: IBindingValue;
MaskBoxBinding: IBindingMaskEdit;
Begin
Binding := BM.CreateByValue(SourceBinding);
If Binding.UI = "MaskEdit" Then
MaskBoxBinding := Binding As IBindingMaskEdit;
//Check if the AUTOSELECT parameter is present
If MaskBoxBinding.AutoSelectDefined Then
System.Diagnostics.Debug.WriteLine("AUTOSELECT: " + MaskBoxBinding.AutoSelect.ToString());
End If;
//Check if the INPUTTEMPLATE parameter is present
If MaskBoxBinding.InputTemplateDefined Then
System.Diagnostics.Debug.WriteLine("INPUTTEMPLATE: " + MaskBoxBinding.InputTemplate);
End If;
//Check if the MASK parameter is present
If MaskBoxBinding.MaskDefined Then
System.Diagnostics.Debug.WriteLine("MASK: " + MaskBoxBinding.Mask);
End If;
//Check if the MAXLENGTH parameter is present
If MaskBoxBinding.MaxLengthDefined Then
System.Diagnostics.Debug.WriteLine("MAXLENGTH: " + MaskBoxBinding.MaxLength.ToString());
End If;
//Check if the VALIDCHARS parameter is present
If MaskBoxBinding.ValidCharsDefined Then
System.Diagnostics.Debug.WriteLine("VALIDCHARS: " + MaskBoxBinding.ValidChars);
End If;
End If;
End Sub;
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: