Hello, I couldn't find an option to manage row scroll speed, currently it's 1, it's too slow, Windows' ListView scroll 3 rows at a wheel down/up.
Grid scroll count
Started by Alex, Jul 10 2014 02:05 AM
1 reply to this topic
#1
Posted 10 July 2014 - 02:05 AM
#2
Posted 10 July 2014 - 07:09 PM
These events are inherited from ancestor controls TNxCustomGrid > TNxScrollControl > TControl. There is no property to modify the scroll speed, but that's not a bad idea.
If you want different behavior in your application, add the events (onmousewheelUp/Down) and modify scrolling as you see fit -- also comment out Inherited; to keep the inherited events from firing.
If you always want different handling, implement the inherited events and methods then override them in TNextGrid. To change the behavior modify DoMouseWheelUp and DoMouseWheelDown. Check out how it's done in TNxCustomGrid if you're not sure how to do it.
It's probably best to add a new published property in TNxCustomGrid i.e. MouseScrollSpeed: Integer = 1 which can be used to modify the scroll behavior. Then modify DoMouseWheelUp/Down. Maybe instead of VertScrollBar.Next do VertScrollBar.MoveBy(MouseScrollSpeed) instead. Handling will need to added to handle range issues but it's the best way imo.
If you want different behavior in your application, add the events (onmousewheelUp/Down) and modify scrolling as you see fit -- also comment out Inherited; to keep the inherited events from firing.
If you always want different handling, implement the inherited events and methods then override them in TNextGrid. To change the behavior modify DoMouseWheelUp and DoMouseWheelDown. Check out how it's done in TNxCustomGrid if you're not sure how to do it.
It's probably best to add a new published property in TNxCustomGrid i.e. MouseScrollSpeed: Integer = 1 which can be used to modify the scroll behavior. Then modify DoMouseWheelUp/Down. Maybe instead of VertScrollBar.Next do VertScrollBar.MoveBy(MouseScrollSpeed) instead. Handling will need to added to handle range issues but it's the best way imo.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users