IBindingDecimalEdit.MaxValue

Syntax

MaxValue: Decimal;

Description

The MaxValue property determines value of the MAXVAL parameter in binding string.

Comments

The MAXVAL parameter determines the maximum available value, which can be set in editor.

The MaxValue property is available if the MaxValueDefined property is set to True. If the MaxValue property is changed, the MaxValueDefined property is automatically set to True.

Example

Function CreateDecimalEditBidning(DefaultValue: Decimal): String;
Var
    BM: IBindingManager;
    DecimalEditBinding: IBindingDecimalEdit;
Begin
    BM := New BindingManager.Create;
    DecimalEditBinding := BM.CreateByUi("DecimalEdit"As IBindingDecimalEdit;
    DecimalEditBinding.MinValue := DefaultValue - 100;
    DecimalEditBinding.MaxValue := DefaultValue + 100;
    DecimalEditBinding.Precision := 20;
    DecimalEditBinding.Step_ := 0.000000000000000000005;
    DecimalEditBinding.Value := DefaultValue;
    DecimalEditBinding.CorrectOnExit := True;
    Return DecimalEditBinding.AsString;
End Function CreateDecimalEditBidning;

This function generates binding string to use value editor of high precision real values. The value, towards which editor parameters are determined, is passed by the DefaultValue input parameter. The value precision will be 20 digits after comma in the editor, the editor step is 0.000000000000000000005. When invalid value is input into the cell with editor (greater than the maximum or less than the minimum) and the focus is removed from the cell, the editor value will be replaced with the nearest available.

See also:

IBindingDecimalEdit