Sign in Join
FPDoc Onlineexperiment

TCustomFloatSpinEdit.GetLimitedValue function

Member of TCustomFloatSpinEditpublicIn unit Spin

Limits the specified value to the minimum and maximum values for the control.

Declaration

pascal
function GetLimitedValue(const AValue: Double): Double; virtual

Arguments

AValue

Value examined in the method.

Function result

Value for the control limited to the range in MinValue and MaxValue.

Description

The return value is set to AValue and limited to the range in the MinValue and MaxValue properties. This occurs when MaxValue has a value that is larger than MinValue. No constraints are applied when MinValue and MaxValue have the the same value, or when MaxValue is smaller than MinValue.

Delphi does not constrain the value when MinValue and MaxValue are the same, but does if MaxValue is smaller than MinValue.

Called from the UpdateControl, StrToValue, and ValueToStr methods.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.