Hi,

I was checking why TScrollBox scrolls so slowly with the mouse wheel. I 
found out that TControlScrollBar.ScrollHandler doesn't take FIncrement 
into account when scrolling causing it to scroll typically only three 
pixels per wheel click. I also noticed that there are a couple of places 
where higher level scroll handlers are used to get around this issue, 
but would it make sense to do it in TControlScrollBar instead? I'm 
thinking about a change like this:

Index: controlscrollbar.inc
===================================================================
--- controlscrollbar.inc        (revision 19278)
+++ controlscrollbar.inc        (working copy)
@@ -377,7 +377,7 @@
      SB_PAGEDOWN:
        Inc(NewPos, FPage);
      SB_THUMBPOSITION, SB_THUMBTRACK:
-      NewPos := Message.Pos;
+      NewPos := FPosition + (Message.Pos - FPosition) * FIncrement;
      SB_TOP:
        NewPos := 0;
      SB_BOTTOM:

Regards,

Ere
_______________________________________________
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to