summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-15 23:05:46 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-07-15 23:05:46 +0000
commitd9637e875d710eb52d9128d540a9885101b5f407 (patch)
tree52f40b99400454da540fd67de844d1d26d78661d
parent2bf7e9419decd0191da4007aa750e0f967197f0a (diff)
downloadfpGUI-d9637e875d710eb52d9128d540a9885101b5f407.tar.xz
-rw-r--r--prototypes/fpgui2/source/core/gfx_widget.pas4
-rw-r--r--prototypes/fpgui2/source/core/x11/gfx_x11.pas4
-rw-r--r--prototypes/fpgui2/source/gui/gui_listbox.pas7
3 files changed, 10 insertions, 5 deletions
diff --git a/prototypes/fpgui2/source/core/gfx_widget.pas b/prototypes/fpgui2/source/core/gfx_widget.pas
index 54882811..7f6be852 100644
--- a/prototypes/fpgui2/source/core/gfx_widget.pas
+++ b/prototypes/fpgui2/source/core/gfx_widget.pas
@@ -418,8 +418,8 @@ begin
//if Assigned(OnKeyPress) then
//OnKeyPress(self, keycode, shiftstate, consumed);
- //if consumed then
- //Exit; //==>
+ if consumed then
+ Exit; //==>
dir := 0;
diff --git a/prototypes/fpgui2/source/core/x11/gfx_x11.pas b/prototypes/fpgui2/source/core/x11/gfx_x11.pas
index 446dac05..8c65d3e4 100644
--- a/prototypes/fpgui2/source/core/x11/gfx_x11.pas
+++ b/prototypes/fpgui2/source/core/x11/gfx_x11.pas
@@ -466,10 +466,10 @@ begin
$6C: Result := $11C; // numpad enter
$6D: Result := $11D; // right ctrl
$70: Result := $135; // numpad /
- $62: Result := $148;
+ $62: Result := $148; // up arrow
$64: Result := $14B;
$66: Result := $14D;
- $68: Result := $150;
+ $68: Result := $150; // down arrow
$6A: Result := $152;
$61: Result := $147;
$63: Result := $149;
diff --git a/prototypes/fpgui2/source/gui/gui_listbox.pas b/prototypes/fpgui2/source/gui/gui_listbox.pas
index c59b7fe1..2ce55e7c 100644
--- a/prototypes/fpgui2/source/gui/gui_listbox.pas
+++ b/prototypes/fpgui2/source/gui/gui_listbox.pas
@@ -216,10 +216,13 @@ end;
procedure TfpgBaseListBox.HandleKeyPress(var keycode: word;
var shiftstate: word; var consumed: boolean);
begin
+// writeln(Classname, '.HandleKeyPress ', IntToHex(keycode, 4));
consumed := true;
+
case keycode of
KEY_UP:
begin // up
+// writeln('up');
if FFocusItem > 1 then
begin
dec(FFocusItem);
@@ -230,6 +233,7 @@ begin
end;
KEY_DOWN:
begin // down
+// writeln('down');
if FFocusItem < ItemCount then
begin
inc(FFocusItem);
@@ -275,10 +279,11 @@ begin
end;
else
begin
+// writeln('...else...');
consumed := false;
- inherited HandleKeyPress(keycode, shiftstate, consumed);
end;
end;
+ inherited HandleKeyPress(keycode, shiftstate, consumed);
end;
procedure TfpgBaseListBox.HandleLMouseDown(x, y: integer; shiftstate: word);