summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-02-21 16:12:20 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-02-21 16:12:20 +0200
commit1afe8cae42b4b5efc2049c589054b0f86d633b54 (patch)
treeebb0d1817c3d57876d97071be7af8e07642f0f60
parent474d5e2fe37db7f2dbf492d551dc7dc84ffe68bb (diff)
downloadfpGUI-1afe8cae42b4b5efc2049c589054b0f86d633b54.tar.xz
fpg_edit: setting the text color via the field variable instead.
If setting the text color via the TextColor property, then FOldColor get overwritten and we loose the real old color.
-rw-r--r--src/gui/fpg_edit.pas4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/fpg_edit.pas b/src/gui/fpg_edit.pas
index 0bad7ee1..6ac32112 100644
--- a/src/gui/fpg_edit.pas
+++ b/src/gui/fpg_edit.pas
@@ -1775,9 +1775,9 @@ procedure TfpgBaseNumericEdit.AdjustColorForNegativeValues;
begin
// Colour negative number
if LeftStr(Text,1) = '-' then
- TextColor := NegativeColor
+ FTextColor := NegativeColor
else
- TextColor := OldColor;
+ FTextColor := OldColor;
end;
function TfpgBaseNumericEdit.GetMarginAdjustment: integer;