Binding: String;
The Binding property determines parameters of the editor that is used to edit call values.
Editor parameters are set using the binding string. To get the binding string, use the property IBindingValue.AsString.
To execute the example a form with the button on it named Button1, the TabSheetBox component named TabSheetBox1 name and a data source for TabSheetBox1 are required.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
BM: IBindingManager;
ComboBoxBinding: IBindingComboBox;
Begin
BM := New BindingManager.Create;
ComboBoxBinding := BM.CreateByUi("ComboBox") As IBindingComboBox;
ComboBoxBinding.Items := "1;2;3;4;5";
ComboBoxBinding.ListMode := False;
ComboBoxBinding.Separators := ";";
ComboBoxBinding.Value := "3";
UiTabSheet1.TabSheet.Cell(0, 0).Style.Binding := ComboBoxBinding.AsString;
End Sub Button1OnClick;
On clicking the button, values editor is set for the A0 table cell. On editing the cell a drop-down list is displayed, containing five values, by default the value "3" is selected.
To execute the example a form with the button on it named Button1, the TabSheetBoxNet component named TabSheetBoxNet1 name and a data source for TabSheetBoxNet1 are required.
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
BM: BindingManager = New BindingManagerClass();
ComboBoxBinding: IBindingComboBox;
Begin
ComboBoxBinding := BM.CreateByUi("ComboBox") As IBindingComboBox;
ComboBoxBinding.Items := "1;2;3;4;5";
ComboBoxBinding.ListMode := False;
ComboBoxBinding.Separators := ";";
ComboBoxBinding.Value := "3";
UiTabSheetNet1.TabSheetUi.TabSheet.Cell[0, 0].Style.Binding := ComboBoxBinding.AsString;
End Sub;
On clicking the button, values editor is set for the A0 table cell. On editing the cell a drop-down list is displayed, containing five values, by default the value "3" is selected.
See also: