diff options
author | drewski207 <drewski207@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-19 00:31:20 +0000 |
---|---|---|
committer | drewski207 <drewski207@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-19 00:31:20 +0000 |
commit | 374d4e73447331268d6eae681f2a530bc4d9ac86 (patch) | |
tree | b9e5201d43a9f04f264e5295fc9092216bfda7d6 /prototypes | |
parent | ed45d631f3e10ffed58e27959cf90f9c766a7486 (diff) | |
download | fpGUI-374d4e73447331268d6eae681f2a530bc4d9ac86.tar.xz |
Implemented TfgpScrollBar mouse scrolling
Diffstat (limited to 'prototypes')
-rw-r--r-- | prototypes/fpgui2/source/gui/gui_scrollbar.pas | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/prototypes/fpgui2/source/gui/gui_scrollbar.pas b/prototypes/fpgui2/source/gui/gui_scrollbar.pas index 9f3ee7cd..325dce0d 100644 --- a/prototypes/fpgui2/source/gui/gui_scrollbar.pas +++ b/prototypes/fpgui2/source/gui/gui_scrollbar.pas @@ -48,6 +48,7 @@ type procedure HandleLMouseDown(x, y: integer; shiftstate: TShiftState); override; procedure HandleLMouseUp(x, y: integer; shiftstate: TShiftState); override; procedure HandleMouseMove(x, y: integer; btnstate: word; shiftstate: TShiftState); override; + procedure HandleMouseScroll(x, y: integer; shiftstate: TShiftState; delta: smallint); override; procedure HandlePaint; override; procedure PositionChange(d: integer); public @@ -328,6 +329,14 @@ begin end; end; +procedure TfpgScrollBar.HandleMouseScroll(x, y: integer; shiftstate: TShiftState; + delta: smallint); +begin + inherited HandleMouseScroll(x, y, shiftstate, delta); + if delta < 0 then PositionChange(-FScrollStep); + if delta > 0 then PositionChange( FScrollStep); +end; + procedure TfpgScrollBar.PositionChange(d: integer); begin FPosition := FPosition + d; |