IBindingFloatEdit.MaxValue

Syntax

MaxValue: Double;

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 for use if the MaxValueDefined property is set to True. If the MaxValue property is changed, the MaxValueDefined property is automatically set to True.

Example

Function CreateFloatEditBidning(DefaultValue: Double): String;
Var
    BM: IBindingManager;
    FloatEditBinding: IBindingFloatEdit;
Begin
    BM := New BindingManager.Create;
    FloatEditBinding := BM.CreateByUi("FloatEdit"As IBindingFloatEdit;
    FloatEditBinding.MinValue := DefaultValue - 100;
    FloatEditBinding.MaxValue := DefaultValue + 100;
    FloatEditBinding.Precision := 3;
    FloatEditBinding.Step_ := 0.005;
    FloatEditBinding.Value := DefaultValue;
    FloatEditBinding.CorrectOnExit := True;
    Return FloatEditBinding.AsString;
End Function CreateFloatEditBidning;

This function generates binding string to use real values editor. The value, towards which editor parameters are determined, is passed by the DefaultValue input parameter. Value precision in editor will be three digits after comma, the editor step is 0.005. 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:

IBindingFloatEdit