summaryrefslogtreecommitdiff
path: root/src/gui/fpg_edit.pas
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-02-21 13:15:10 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-02-21 13:15:10 +0200
commit0be503e7108d81fb28bbb748f785b6fd9c9de56a (patch)
tree4a9a04c3e50b0f87ec6ee4a76b6ffba136d24c6b /src/gui/fpg_edit.pas
parentc592afdcb2c5e3fa1da2df4044a48976e5a8a8f7 (diff)
downloadfpGUI-0be503e7108d81fb28bbb748f785b6fd9c9de56a.tar.xz
fpg_edit: Setting TextColor in numeric edit components never updated OldColor value.
Diffstat (limited to 'src/gui/fpg_edit.pas')
-rw-r--r--src/gui/fpg_edit.pas10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/fpg_edit.pas b/src/gui/fpg_edit.pas
index e04f02eb..9c96f489 100644
--- a/src/gui/fpg_edit.pas
+++ b/src/gui/fpg_edit.pas
@@ -216,6 +216,7 @@ type
protected
function GetMarginAdjustment: integer; override;
procedure HandlePaint; override;
+ procedure SetTextColor(const AValue: TfpgColor); override;
procedure FormatEdit; virtual;
procedure Justify; virtual; // to implement in derived classes
property OldColor: TfpgColor read FOldColor write SetOldColor;
@@ -1825,6 +1826,15 @@ begin
end;
end;
+procedure TfpgBaseNumericEdit.SetTextColor(const AValue: TfpgColor);
+begin
+ if FTextColor = AValue then
+ Exit; //==>
+ FTextColor := AValue;
+ FOldColor := AValue;
+ Repaint;
+end;
+
procedure TfpgBaseNumericEdit.FormatEdit;
begin
SetShowThousand;