mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 14:19:31 +02:00
* TNumericField.SetAsboolean Mantis 18765
git-svn-id: trunk@18085 -
This commit is contained in:
parent
550657f0e0
commit
92d4bc1a31
@ -514,7 +514,8 @@ type
|
||||
procedure RangeError(AValue, Min, Max: Double);
|
||||
procedure SetDisplayFormat(const AValue: string);
|
||||
procedure SetEditFormat(const AValue: string);
|
||||
function GetAsBoolean: Boolean; override;
|
||||
function GetAsBoolean: Boolean; override;
|
||||
Procedure SetAsBoolean(AValue: Boolean); override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
published
|
||||
|
@ -1336,6 +1336,14 @@ begin
|
||||
Result:=GetAsInteger<>0;
|
||||
end;
|
||||
|
||||
procedure TNumericField.SetAsBoolean(AValue: Boolean);
|
||||
begin
|
||||
if AValue then
|
||||
SetAsLongint(1)
|
||||
else
|
||||
SetAsLongint(0);
|
||||
end;
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TLongintField
|
||||
---------------------------------------------------------------------}
|
||||
|
Loading…
Reference in New Issue
Block a user