diff options
-rw-r--r-- | src/gui/fpg_edit.pas | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/fpg_edit.pas b/src/gui/fpg_edit.pas index fe52655b..61c20808 100644 --- a/src/gui/fpg_edit.pas +++ b/src/gui/fpg_edit.pas @@ -214,6 +214,7 @@ type procedure SetShowThousand; procedure AdjustColorForNegativeValues; protected + procedure DoOnChange; override; function GetMarginAdjustment: integer; override; procedure HandlePaint; override; procedure SetTextColor(const AValue: TfpgColor); override; @@ -1780,6 +1781,12 @@ begin FTextColor := OldColor; end; +procedure TfpgBaseNumericEdit.DoOnChange; +begin + AdjustColorForNegativeValues; + inherited DoOnChange; +end; + function TfpgBaseNumericEdit.GetMarginAdjustment: integer; begin // Due to numeric edits being right aligned, the margin is negative |