summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-06-03 10:49:37 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-06-03 10:49:37 +0000
commit8a3b02508005b580613b95f0e02811a4392a2fc2 (patch)
treedee3c39411ab16039e36771239afc532139d5eaa /src/gui
parentb7e48a6753b62c1c18ce2fe8f60d03f0c272d820 (diff)
downloadfpGUI-8a3b02508005b580613b95f0e02811a4392a2fc2.tar.xz
* Applied Jean-Marc's patch to gui_listbox fixing issues in editcombo.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui_listbox.pas19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/gui_listbox.pas b/src/gui/gui_listbox.pas
index 2825df34..dd631dd7 100644
--- a/src/gui/gui_listbox.pas
+++ b/src/gui/gui_listbox.pas
@@ -775,16 +775,17 @@ var
begin
// If the user pressed a key then it will search the stringlist for a word
// beginning with that letter
- if (Ord(AText[1]) > 31) and (Ord(AText[1]) < 127) and (FFocusItem > -1) or (Length(AText) > 1 ) then
- for i := FFocusItem to FItems.Count-1 do
- begin
- if SameText(LeftStr(FItems.Strings[i], Length(AText)), AText) then
+ if (Ord(AText[1]) > 31) and (Ord(AText[1]) < 127) or (Length(AText) > 1 ) then
+ if FFocusItem > -1 then
+ for i := FFocusItem to FItems.Count-1 do
begin
- FocusItem := i;
- Consumed := True;
- break;
- end;
- end; { for }
+ if SameText(LeftStr(FItems.Strings[i], Length(AText)), AText) then
+ begin
+ FocusItem := i;
+ Consumed := True;
+ break;
+ end;
+ end; { for }
inherited HandleKeyChar(AText, shiftstate, consumed);
end;