The following parameters are available to set up value editor using binding string:
Name of the parameter |
Type | Description | Mandatory |
NODES | String | Tree node names separated using the separator character (the separator character is determined in the SEPARATORS parameter). The node subelements are determined in curved brackets, the subelements are also separated with separator. | None |
SEPARATORS | String | Separator characters of strings in NODES (by default it is |). | None |
VALUE | String | Default value. | None |
The component embedded using the Fore language enables the user to put quotation marks into element text. To do this, the """ symbol combination is used:
NODES=""Node"".
UI="TreeCombo" NODES="Element 1,{Element 1_1,{Element 1_1_1},Element 1_2},Element 2,{Element 2_1}" SEPARATORS = "," VALUE="Element 1"
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;
TreeComboBinding: IBindingTreeCombo;
Begin
BM := New BindingManager.Create;
TreeComboBinding := BM.CreateByUi("TreeCombo") As IBindingTreeCombo;
//Nodes
TreeComboBinding.Nodes := "Element 1,{Element 1_1,{Element 1_1_1},Element 1_2},Element 2,{Element 2_1}";
//Node separator
TreeComboBinding.Separators := ",";
//Default node
TreeComboBinding.Value := "Element 1";
UiTabSheet1.TabSheet.Cell(0, 0).Style.Binding := TreeComboBinding.AsString;
End Sub Button1OnClick;
End Class TestForm;
Clicking the button sets the value editor for the A0 table cell. On cell editing, the three level combo tree is displayed, by default the element named Element 1 is highlighted.