You've already forked lazarus-ccr
ExCtrls: Undo r7957. Obsolete after recent changes in FPC.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7960 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -47,6 +47,8 @@ type
|
|||||||
FDecimalSeparator: Char;
|
FDecimalSeparator: Char;
|
||||||
FNegCurrencyFormat: TSpinEditNegCurrencyFormat;
|
FNegCurrencyFormat: TSpinEditNegCurrencyFormat;
|
||||||
FThousandSeparator: Char;
|
FThousandSeparator: Char;
|
||||||
|
function IncrementStored: Boolean;
|
||||||
|
function MaxValueStored: Boolean;
|
||||||
procedure SetCurrencyFormat(AValue: TSpinEditCurrencyFormat);
|
procedure SetCurrencyFormat(AValue: TSpinEditCurrencyFormat);
|
||||||
procedure SetCurrencyString(AValue: String);
|
procedure SetCurrencyString(AValue: String);
|
||||||
procedure SetDecimals(AValue: TSpinEditCurrencyDecimals);
|
procedure SetDecimals(AValue: TSpinEditCurrencyDecimals);
|
||||||
@ -55,9 +57,6 @@ type
|
|||||||
procedure SetThousandSeparator(AValue: Char);
|
procedure SetThousandSeparator(AValue: Char);
|
||||||
protected
|
protected
|
||||||
procedure EditKeyPress(var Key: char); override;
|
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 SafeInc(AValue: Currency): Currency; override;
|
||||||
function SafeDec(AValue: Currency): Currency; override;
|
function SafeDec(AValue: Currency): Currency; override;
|
||||||
function TextIsNumber(const S: String; out ANumber: Currency): Boolean; override;
|
function TextIsNumber(const S: String; out ANumber: Currency): Boolean; override;
|
||||||
@ -82,6 +81,8 @@ type
|
|||||||
read FNegCurrencyFormat write SetNegCurrencyFormat;
|
read FNegCurrencyFormat write SetNegCurrencyFormat;
|
||||||
property ThousandSeparator: Char
|
property ThousandSeparator: Char
|
||||||
read FThousandSeparator write SetThousandSeparator;
|
read FThousandSeparator write SetThousandSeparator;
|
||||||
|
property Increment stored IncrementStored;
|
||||||
|
property MaxValue stored MaxValueStored;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCurrSpinEdit }
|
{ TCurrSpinEdit }
|
||||||
@ -309,6 +310,7 @@ end;
|
|||||||
constructor TCustomCurrSpinEditEx.Create(AOwner: TComponent);
|
constructor TCustomCurrSpinEditEx.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
FIncrement := 1;
|
||||||
FMaxValue := 0;
|
FMaxValue := 0;
|
||||||
FMinValue := 0; // --> disable Max/Min check by default
|
FMinValue := 0; // --> disable Max/Min check by default
|
||||||
ResetFormatSettings;
|
ResetFormatSettings;
|
||||||
@ -334,12 +336,6 @@ begin
|
|||||||
Result := FMaxValue <> 0;
|
Result := FMaxValue <> 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomCurrSpinEditEx.MinValueStored: Boolean;
|
|
||||||
begin
|
|
||||||
Result := FMinValue <> 0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure TCustomCurrSpinEditEx.ResetFormatSettings;
|
procedure TCustomCurrSpinEditEx.ResetFormatSettings;
|
||||||
begin
|
begin
|
||||||
FDecimals := DefaultFormatSettings.CurrencyDecimals;
|
FDecimals := DefaultFormatSettings.CurrencyDecimals;
|
||||||
|
Reference in New Issue
Block a user