IBindingIntegerEdit.MaxValue

Syntax

MaxValue: Integer;

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 CreateIntegerEditBidning(DefaultValue: Integer): String;
Var
    BM: IBindingManager;
    IntegerEditBinding: IBindingIntegerEdit;
Begin
    BM := New BindingManager.Create;
    IntegerEditBinding := BM.CreateByUi("IntegerEdit"As IBindingIntegerEdit;
    IntegerEditBinding.Mandatory := True;
    IntegerEditBinding.CorrectOnExit := True;
    IntegerEditBinding.MinValue := DefaultValue - 100;
    IntegerEditBinding.MaxValue := DefaultValue + 100;
    IntegerEditBinding.Value := DefaultValue;
    IntegerEditBinding.MaxLength := 3;
    Return IntegerEditBinding.AsString;
End Function CreateIntegerEditBidning;

This function generates binding string to use editor of integer values. The value, towards which editor parameters are determined, is passed by the DefaultValue input parameter. When invalid value is input to the cell with editor (greater than the maximum value or less than the minimum value) and focus is taken off from the cell, the editor value will be replaced with the nearest available. The limit of input character number set for the editor is three.

See also:

IBindingIntegerEdit