Menu

#45 mouse wheel

open
nobody
None
5
2013-03-07
2013-03-07
annkok
No

In some case,mouse wheel action doesn't work.

I found it was because in treeviewadv class ,OnMouseWheel method doesn't anything.
see the code belowing:

class TreeViewAdv
protected override void OnMouseWheel(MouseEventArgs e)
{
......before......
int lines =( e.Delta / 120* SystemInformation.MouseWheelScrollLines);
.....if e.delta<120, lines will be always 0....so..
.....I change it to......
int lines =(int)( e.Delta / 120.0 * SystemInformation.MouseWheelScrollLines);
.....it works...
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.