Quantcast
Channel: GMap.NET - Great Maps for Windows Forms & Presentation
Viewing all articles
Browse latest Browse all 3384

New Post: Change zoom increments

$
0
0
I discovered something interesting. Apparently a numericeUpDown control also responds to the mouse wheel when it has the focus.

So I covered the above numericUpDown1 control with a panel to hide it (making it not visible disables it and will not work).

Then I added a checkbox "Check for Fine Tuning"

When the checkbox is checked I set the focus to the numericUpDown1 control with numericUpDown1.Focus(); and the mouse wheel will now trigger numericUpDown1_ValueChanged and the mouse wheel will change the zoom by the very small amount of .006.

When the checkbox is unchecked I set the focus to anything other than numericUpDown1 and the mouse wheel behaves normally for zooming.

Also, you may have noticed in the above code that the zoom is incremented / decremented by .006. For some reason if you set it to .005 zooming will hang.

Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>