IBindingCheckBox.CaptionDefined

Fore Syntax

CaptionDefined: Boolean;

Fore.NET Syntax

CaptionDefined: Boolean;

Description

The CaptionDefined property determines whether the TEXT parameter is present in binding string.

Comments

If the CaptionDefined property is set to True, the binding string describing the value editor will contain the TEXT parameter. The value of this parameter is determined by the Caption property.

Fore Example

Sub CheckBoxBindingInfo(SourceBinding: String);
Var
    BM: IBindingManager;
    Binding: IBindingValue;
    CheckBoxBinding: IBindingCheckBox;
Begin
    BM := New BindingManager.Create;
    Binding := BM.CreateByValue(SourceBinding);
    If Binding.UI = "CheckBox" Then
        CheckBoxBinding := Binding As IBindingCheckBox;
        
//Check if the ALIGN parameter is present
        If CheckBoxBinding.AlignDefined Then
            Debug.WriteLine(
"ALIGN: " + CheckBoxBinding.Align.ToString);
        
End If;

        //Check if the TEXT parameter is present
        If CheckBoxBinding.CaptionDefined Then
            Debug.WriteLine("TEXT: " + CheckBoxBinding.Caption);
        End If;
        //Check if the VALUE parameter is present
        If CheckBoxBinding.ValueDefined Then
            Debug.WriteLine("VALUE: " + CheckBoxBinding.Value.ToString);
        End If;
    End If;
End Sub CheckBoxBindingInfo;

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

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.ForeSystem;

Sub CheckBoxBindingInfo(SourceBinding: String);
Var
    BM: BindingManager = New BindingManagerClass();
    Binding: IBindingValue;
    CheckBoxBinding: IBindingCheckBox;
Begin
    Binding := BM.CreateByValue(SourceBinding);
    If Binding.UI = "CheckBox" Then
        CheckBoxBinding := Binding As IBindingCheckBox;
        
//Check if the ALIGN parameter is present
        If CheckBoxBinding.AlignDefined Then

            
System.Diagnostics.Debug.WriteLine(
"ALIGN: " + CheckBoxBinding.Align.ToString());
        
End If;
        //Check if the TEXT parameter is present
        If CheckBoxBinding.CaptionDefined Then
            System.Diagnostics.Debug.WriteLine("TEXT: " + CheckBoxBinding.Caption);
        End If;
        //Check if the VALUE parameter is present
        If CheckBoxBinding.ValueDefined Then
            System.Diagnostics.Debug.WriteLine("VALUE: " + CheckBoxBinding.Value.ToString());
        End If;
    End If;
End Sub;

See also:

IBindingCheckBox