The following parameters are available to set up value editor using binding string:
Name of the parameter |
Type | Description | Mandatory |
ITEMS | String | Available values separated using the separator character (The separator character is set in the SEPARATORS parameter). | None |
LISTMODE | Logical | Strings are prohibited to be input in the editor. | None |
SEPARATORS | String | Separator characters in ITEMS (by default it is |). | None |
VALUE | String | Default value. | None |
Logical values are set as character string of the ON/OFF or the True/False type.
None
UI="ComboBox" ITEMS="1,2,3,4,5" SEPARATORS="," VALUE="3"
Executing the example requires a form with the button named Button1 on it, the TabSheetBox component and the UiTabSheet component named UiTabSheet1, which is the data source for TabSheetBox.
Class TestForm: Form
Button1: Button;
UiTabSheet1: UiTabSheet;
TabSheetBox1: TabSheetBox;
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;
End Class TestForm;
Clicking the button sets the value editor for the A0 table cell. On editing the cell, the combobox containing five values is displayed, by default the 3 element is selected.