[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 72

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 contains the value from AValue after it has been limited to the range in the MinValue and MaxValue properties. This action does not occur when MaxValue has the same value as MinValue, or 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.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.