* TNumericField.SetAsboolean Mantis 18765

git-svn-id: trunk@18085 -
This commit is contained in:
marco 2011-08-03 20:49:56 +00:00
parent 550657f0e0
commit 92d4bc1a31
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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
---------------------------------------------------------------------}