mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 23:20:33 +02:00
LazControls/SpinEditEx: Fix compilation issue to work also for FPC 3.2
git-svn-id: trunk@64334 -
This commit is contained in:
parent
80056f13d9
commit
a25bbfe7d2
@ -202,7 +202,7 @@ end;
|
||||
|
||||
function TSpinEditExBase.MaxValueStored: Boolean;
|
||||
begin
|
||||
Result := CompareValue(FMaxValue, T(DefMaxValue)) <> 0;
|
||||
Result := true; //not SameValue(FMaxValue, DefMaxValue);
|
||||
end;
|
||||
|
||||
procedure TSpinEditExBase.EditMouseWheelUp(Shift: TShiftState;
|
||||
@ -252,7 +252,7 @@ end;
|
||||
|
||||
function TSpinEditExBase.IncrementStored: Boolean;
|
||||
begin
|
||||
Result := CompareValue(FIncrement, T(DefIncrement)) <> 0;
|
||||
Result := true;
|
||||
end;
|
||||
|
||||
function TSpinEditExBase.IsLimited: Boolean;
|
||||
@ -466,13 +466,22 @@ begin
|
||||
Result := FFS;
|
||||
end;
|
||||
|
||||
|
||||
procedure TCustomFloatSpinEditEx.EditKeyPress(var Key: char);
|
||||
begin
|
||||
if (Key in ['.',',']) then Key := FFS.Decimalseparator;
|
||||
inherited EditKeyPress(Key);
|
||||
end;
|
||||
|
||||
function TCustomFloatSpinEditEx.IncrementStored: Boolean;
|
||||
begin
|
||||
Result := not SameValue(FIncrement, DefIncrement);
|
||||
end;
|
||||
|
||||
function TCustomFloatSpinEditEx.MaxValueStored: Boolean;
|
||||
begin
|
||||
Result := not SameValue(FMaxValue, DefMaxValue);
|
||||
end;
|
||||
|
||||
function TCustomFloatSpinEditEx.TextIsNumber(const S: String; out ANumber: Double
|
||||
): Boolean;
|
||||
begin
|
||||
@ -614,6 +623,16 @@ begin
|
||||
Result := StringReplace(ValueS, AThousandSeparator, '', [rfReplaceAll]);
|
||||
end;
|
||||
|
||||
function TCustomSpinEditEx.IncrementStored: Boolean;
|
||||
begin
|
||||
Result := not SameValue(FIncrement, DefIncrement);
|
||||
end;
|
||||
|
||||
function TCustomSpinEditEx.MaxValueStored: Boolean;
|
||||
begin
|
||||
Result := not SameValue(FMaxValue, DefMaxValue);
|
||||
end;
|
||||
|
||||
procedure TCustomSpinEditEx.SetThousandSeparator(AValue: String);
|
||||
begin
|
||||
if FThousandSeparator = AValue then Exit;
|
||||
|
@ -125,8 +125,6 @@ type
|
||||
procedure UpDownChangingEx(Sender: TObject; var {%H-}AllowChange: Boolean;
|
||||
{%H-}NewValue: SmallInt; Direction: TUpDownDirection);
|
||||
procedure UpDownClick(Sender: TObject; {%H-}Button: TUDBtnType);
|
||||
function IncrementStored: Boolean;
|
||||
function MaxValueStored: Boolean;
|
||||
protected
|
||||
function GetBuddyClassType: TControlClass; override;
|
||||
procedure DoEnter; override;
|
||||
@ -136,6 +134,8 @@ type
|
||||
procedure EditKeyDown(var Key: word; Shift: TShiftState); override;
|
||||
procedure EditMouseWheelUp(Shift: TShiftState; MousePos: TPoint; var Handled: Boolean); override;
|
||||
procedure EditMouseWheelDown(Shift: TShiftState; MousePos: TPoint; var Handled: Boolean); override;
|
||||
function IncrementStored: Boolean; virtual;
|
||||
function MaxValueStored: Boolean; virtual;
|
||||
function SafeInc(AValue: T): T; virtual; abstract;
|
||||
function SafeDec(AValue: T): T; virtual abstract;
|
||||
procedure SetValue(const AValue: T); virtual;
|
||||
@ -202,6 +202,8 @@ type
|
||||
protected
|
||||
function GetFormatsettings: TFormatSettings;
|
||||
procedure EditKeyPress(var Key: char); override;
|
||||
function IncrementStored: Boolean; override;
|
||||
function MaxValuestored: Boolean; override;
|
||||
function TextIsNumber(const S: String; out ANumber: Double): Boolean; override;
|
||||
function SafeInc(AValue: Double): Double; override;
|
||||
function SafeDec(AValue: Double): Double; override;
|
||||
@ -314,6 +316,8 @@ type
|
||||
FThousandSeparator: String;
|
||||
procedure SetThousandSeparator(AValue: String);
|
||||
protected
|
||||
function IncrementStored: Boolean; override;
|
||||
function MaxValuestored: Boolean; override;
|
||||
function SafeInc(AValue: Int64): Int64; override;
|
||||
function SafeDec(AValue: Int64): Int64; override;
|
||||
function TextIsNumber(const S: String; out ANumber: Int64): Boolean; override;
|
||||
|
Loading…
Reference in New Issue
Block a user