The following parameters are available to set up value editor using binding string:
Name of the parameter |
Type | Description | Mandatory |
MAXLENGTH | Integer | The maximum length of input string. | None |
VALUE | String | Default value. | None |
READONLY | Logical | Prohibits to edit values. | None |
MULTILINE | Logical | Indicates that text is arranged in several lines. | None |
Logical values are set as a character string of the ON/OFF or the True/False type.
None
UI="EditBox" VALUE="Default value" MAXLENGTH="15"
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;
EditBoxBinding: IBindingEditBox;
Begin
BM := New BindingManager.Create;
EditBoxBinding := BM.CreateByUi("EditBox") As IBindingEditBox;
EditBoxBinding.MaxLength := 30;
EditBoxBinding.MultiLine := True;
EditBoxBinding.ReadOnly := False;
EditBoxBinding.Value := "Text...";
UiTabSheet1.TabSheet.Cell(0, 0).Style.Binding := EditBoxBinding.AsString;
End Sub Button1OnClick;
End Class TestForm;
Clicking the button sets the value editor for the A0 table cell. On editing the cell, string value input field will be displayed, the value length restriction is 30 characters, the value can be arranged in several strings, the default value is "Text...".