From 68b28beb2a5eba7e1d249e1a857012d79452e37c Mon Sep 17 00:00:00 2001 From: graemeg Date: Fri, 9 May 2008 13:32:25 +0000 Subject: * Fixed bug where Up or Down arrow usage in ComboBox without drowpdown did not fire OnChange event. --- src/gui/gui_combobox.pas | 7 +++++++ 1 file changed, 7 insertions(+) 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 } -- cgit v1.2.3-70-g09d2