diff --git a/components/exctrls/source/exeditctrls.pas b/components/exctrls/source/exeditctrls.pas index 7d592e878..bdc1a598a 100644 --- a/components/exctrls/source/exeditctrls.pas +++ b/components/exctrls/source/exeditctrls.pas @@ -47,7 +47,6 @@ type FDecimalSeparator: Char; FNegCurrencyFormat: TSpinEditNegCurrencyFormat; FThousandSeparator: Char; - function IsIncrementStored: Boolean; procedure SetCurrencyFormat(AValue: TSpinEditCurrencyFormat); procedure SetCurrencyString(AValue: String); procedure SetDecimals(AValue: TSpinEditCurrencyDecimals); @@ -56,6 +55,9 @@ type procedure SetThousandSeparator(AValue: Char); protected procedure EditKeyPress(var Key: char); override; + function IncrementStored: Boolean; override; + function MaxValuestored: Boolean; override; + function MinValuestored: Boolean; override; function SafeInc(AValue: Currency): Currency; override; function SafeDec(AValue: Currency): Currency; override; function TextIsNumber(const S: String; out ANumber: Currency): Boolean; override; @@ -68,7 +70,6 @@ type procedure ResetFormatSettings; function StrToValue(const S: String): Currency; override; public - property Increment stored IsIncrementStored; property CurrencyFormat: TSpinEditCurrencyFormat read FCurrencyFormat write SetCurrencyFormat; property CurrencyString: String @@ -323,6 +324,22 @@ begin if (Key = '-') and IsLimited and (MinValue >= 0) then Key := #0; end; +function TCustomCurrSpinEditEx.IncrementStored: Boolean; +begin + Result := FIncrement <> 1; +end; + +function TCustomCurrSpinEditEx.MaxValueStored: Boolean; +begin + Result := FMaxValue <> 0; +end; + +function TCustomCurrSpinEditEx.MinValueStored: Boolean; +begin + Result := FMinValue <> 0; +end; + + procedure TCustomCurrSpinEditEx.ResetFormatSettings; begin FDecimals := DefaultFormatSettings.CurrencyDecimals; @@ -333,11 +350,6 @@ begin FThousandSeparator := DefaultFormatSettings.ThousandSeparator; end; -function TCustomCurrSpinEditEx.IsIncrementStored: Boolean; -begin - Result := FIncrement <> 1; -end; - function TCustomCurrSpinEditEx.SafeInc(AValue: Currency): Currency; begin if (AValue > 0) and (AValue > MaxCurrency-FIncrement) then