diff --git a/components/jujiboutils/changes.txt b/components/jujiboutils/changes.txt index 51697e073..3de15a8a9 100644 --- a/components/jujiboutils/changes.txt +++ b/components/jujiboutils/changes.txt @@ -5,7 +5,7 @@ Note: Lazarus Trunk required Version pre-1.1 -------------------------------------------------- -2012-09-20 Added: TJLabeledIntegerEdit property CurrentValue +2012-09-20 Added: TJLabeledIntegerEdit and TJLabeledFloatEdit 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 diff --git a/components/jujiboutils/src/jlabeledfloatedit.pas b/components/jujiboutils/src/jlabeledfloatedit.pas index e0ea182fd..eb54c7606 100644 --- a/components/jujiboutils/src/jlabeledfloatedit.pas +++ b/components/jujiboutils/src/jlabeledfloatedit.pas @@ -38,6 +38,7 @@ type function getDecimals: integer; function getFormat: string; function getValue: double; + function getCurrentValue: double; procedure formatInput; procedure setDecimals(const AValue: integer); procedure setFormat(const AValue: string); @@ -53,6 +54,7 @@ type { Public declarations } constructor Create(TheOwner: TComponent); override; destructor Destroy; override; + property CurrentValue: double read getCurrentValue; published { Published declarations } property DisplayFormat: string read getFormat write setFormat; @@ -135,6 +137,11 @@ begin Result := theValue; end; +function TJLabeledFloatEdit.getCurrentValue: double; +begin + Result:= StrToFloatDef(Text, Value); +end; + procedure TJLabeledFloatEdit.formatInput; begin Caption := FormatFloat(DisplayFormat, theValue);