diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-05-09 13:32:25 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-05-09 13:32:25 +0000 |
commit | 68b28beb2a5eba7e1d249e1a857012d79452e37c (patch) | |
tree | 3581702b89a7ae238b8700ec8cfc60f66167f6aa | |
parent | 1805b503d2f564c8c7fc95478827a6d5b0aad4e8 (diff) | |
download | fpGUI-68b28beb2a5eba7e1d249e1a857012d79452e37c.tar.xz |
* Fixed bug where Up or Down arrow usage in ComboBox without drowpdown did not fire OnChange event.
-rw-r--r-- | src/gui/gui_combobox.pas | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/gui_combobox.pas b/src/gui/gui_combobox.pas index 125d7003..f103c13a 100644 --- a/src/gui/gui_combobox.pas +++ b/src/gui/gui_combobox.pas @@ -229,10 +229,13 @@ end; procedure TfpgBaseComboBox.HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); +var + old: integer; begin inherited HandleKeyPress(keycode, shiftstate, consumed); if not consumed then begin + old := FocusItem; case keycode of keyDown: begin @@ -241,6 +244,8 @@ begin else begin FocusItem := FocusItem + 1; + if old <> FocusItem then + DoOnChange; consumed := True; end; end; @@ -248,6 +253,8 @@ begin keyUp: begin FocusItem := FocusItem - 1; + if old <> FocusItem then + DoOnChange; consumed := True; end; end; { case } |