diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2010-10-01 19:27:57 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2010-10-01 19:27:57 +0200 |
commit | f1a559059dbea9b0d85aab4724d16cec994d9937 (patch) | |
tree | 4bede6cb923a8ea17afdcab7d2ba3eaf0ef9a7b8 /src/gui | |
parent | 0415e52e105d0f7fabf019d37dfbb3ac8d2c88c8 (diff) | |
download | fpGUI-f1a559059dbea9b0d85aab4724d16cec994d9937.tar.xz |
TfpgSpinEdit bugfix: key up/down/pgup/pgdn never triggered the OnChange event.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_spinedit.pas | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/fpg_spinedit.pas b/src/gui/fpg_spinedit.pas index 0bd51fd5..99c4e697 100644 --- a/src/gui/fpg_spinedit.pas +++ b/src/gui/fpg_spinedit.pas @@ -1113,9 +1113,13 @@ begin begin FValue := 0; FEdit.Value := FValue; + DoOnChange; end else if (StrToInt(FEdit.Text) <= FMaxValue) and (StrToInt(FEdit.Text) >= FMinValue) then - FValue := FEdit.Value + begin + FValue := FEdit.Value; + DoOnChange; + end else FEdit.Value := FValue; @@ -1124,11 +1128,13 @@ begin begin Inc(FValue, FIncrement); FEdit.Value := FValue; + DoOnChange; end else if not IsMaxLimitReached then begin FValue := FMaxValue; FEdit.Value := FValue; + DoOnChange; end; if KeyCode = KeyDown then @@ -1136,23 +1142,27 @@ begin begin Dec(FValue, FIncrement); FEdit.Value := FValue; + DoOnChange; end else if not IsMinLimitReached then begin FValue := FMinValue; FEdit.Value := FValue; + DoOnChange; end; if KeyCode = KeyPageUp then begin FValue := FMaxValue; FEdit.Value := FValue; + DoOnChange; end; if KeyCode = KeyPageDown then begin FValue := FMinValue; FEdit.Value := FValue; + DoOnChange; end; EnableButtons; |