[Overview][Classes][Procedures and functions][Index] | Reference for unit 'Spin' (#lcl)

# TCustomFloatSpinEdit.GetLimitedValue

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

## Declaration

Source position: spin.pp line 74

`public function TCustomFloatSpinEdit.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.

Remark: | 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.