IBindingFloatEdit.MaxValue

Fore Syntax

MaxValue: Double;

Fore.NET Syntax

MaxValue: Double;

Description

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

Comments

The MAXVAL parameter determines 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.

Fore 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 maximum or less than minimum) and the focus is removed from the cell, the editor value will be replaced with the nearest available.

Fore.NET Example

Imports Prognoz.Platform.Interop.ForeSystem;

Function CreateFloatEditBidning(DefaultValue: Double): String;
Var
    BM: BindingManager = New BindingManagerClass();
    FloatEditBinding: IBindingFloatEdit;
Begin
    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;

The result of executing the example is similar to the Fore example result.

See also:

IBindingFloatEdit