I have a TListView component in a form. It’s quite long and I want user to able scroll it, if mouse is over the component and wheel is scrolled. I do not find any OnMouseWheel, OnMouseWheelDown or OnMouseWheelUp event for TListView object. How can I do that?
Regards,
evilone
Here’s my code to do this:
GenericMouseWheelis quite nifty. It works for any control with a vertical scroll bar. I use it with tree views, list views, list boxes, memos, rich edits, etc.You’ll be missing my
ModifierKeyStateroutine but you can substitute your own method for checking that the wheel event is not modified. The reason you want to do this is the, for example, CTRL+mouse wheel means zoom rather than scroll.For what it’s worth, it looks like this: