Added: TJLabeledIntegerEdit property CurrentValue

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2527 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
jujibo
2012-09-20 14:25:33 +00:00
parent 49e82e3e66
commit 79fddd5ecf
2 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,7 @@ Note: Lazarus Trunk required
Version pre-1.1
--------------------------------------------------
2012-09-20 Added: TJLabeledIntegerEdit property CurrentValue
2012-06-12 Fixed: TJDbGridTimeCtrl, store time value
2012-03-14 Fixed: Prevent double updates (QT widgetset) in edit widgets
2012-03-06 Fixed: Focus issues

View File

@ -36,6 +36,7 @@ type
fFormat: string;
function getFormat: string;
function getValue: integer;
function getCurrentValue: integer;
procedure setFormat(const AValue: string);
procedure setValue(const AValue: integer);
function IsValidInteger(const Value: string): boolean;
@ -49,6 +50,7 @@ type
{ Public declarations }
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
property CurrentValue: integer read getCurrentValue;
published
{ Published declarations }
property DisplayFormat: string read getFormat write setFormat;
@ -125,6 +127,11 @@ begin
Result := theValue;
end;
function TJLabeledIntegerEdit.getCurrentValue: integer;
begin
Result:= StrToIntDef(Text, Value);
end;
procedure TJLabeledIntegerEdit.setFormat(const AValue: string);
begin
fFormat := AValue;