The DecimalEdit Value Editor

The following parameters are available to set up value editor using binding string:

Name
of the parameter
Type Description Mandatory
VALUE Real Default value. None
MINVAL Real Minimum available value. None
MAXVAL Real The maximum available value. None
PRECISION Integer Precision of displayed value (number of digits after comma). None
STEP Real Step. None
ALLOWEMPTY Logical Value can be empty. None
CORRECTONEXIT Logical Indicates that value is automatically adjusted on editor loss of focus. None

Logical values are set as a character string of the ON/OFF or the True/False type.

Features of Application

None

Binding String

UI="DecimalEdit" CORRECTONEXIT="True" MAXVAL="100" MINVAL="-100" PRECISION="20" STEP="0.000000000000000000005" VALUE="0"

Example

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;
        DecimalEditBinding: IBindingDecimalEdit;
    Begin
        BM := New BindingManager.Create;
        DecimalEditBinding := BM.CreateByUi("DecimalEdit"As IBindingDecimalEdit;
        DecimalEditBinding.MinValue := -100;
        DecimalEditBinding.MaxValue := 100;
        DecimalEditBinding.Precision := 20;
        DecimalEditBinding.Step_ := 0.000000000000000000005;
        DecimalEditBinding.Value := 0;
        DecimalEditBinding.CorrectOnExit := True;
        UiTabSheet1.TabSheet.Cell(00).Style.Binding := DecimalEditBinding.AsString;
    End Sub Button1OnClick;

End Class TestForm;

On clicking the button the high-precision value editor will be determined for the A0 table cell. On editing the cell, real value input field is displayed, the minimum value is -100, the maximum value is 100, precision is 20 digits after point, step is 0.000000000000000000005, the default value is 0.

Back