diff options
Diffstat (limited to 'prototypes/fpgui2/source')
-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; |