image thumbnail

Change value with mouse wheel scrolling

version 1.0.0 (62.2 KB) by Y.Yang
This app demonstrates how to change values of spinner, slider and table data with mouse wheel scrolling.

140 Downloads

Updated 11 Sep 2020

View License

Tips:

1. WindowScrollWheelFcn to catch mouse wheel scroll event.
2. Tag UI elements for use mouse wheel scrolling.
3. If there are multiple tabs, change the tag array for mouse events.
4. Loop tagged UI elements to match the current mouse pointer, getpixelposition(h,recursive) is usefull for finding the absolute position of h.
5. The height of a slider is 3, so it is not easy to cover it with mouse pointer.

Cite As

Y.Yang (2022). Change value with mouse wheel scrolling (https://www.mathworks.com/matlabcentral/fileexchange/80071-change-value-with-mouse-wheel-scrolling), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!