|
"Ted " <dustman@cvrti.utah.edu> wrote...
> Now, when a user presses and holds down a slider arrow button the slider's value increases faster than the callback gets called, that is, there is not a one to one correspondence between the slider value changing by it's min-step value and my callback being called. In other words, each time my callback is called, the slider's value may have changed by 4*min-step. Does that make sense? Is that expected? Is there a way to make the slider call my callback for each min-step change in the slider's value when a user presses and holds down one of the slider's arrow buttons (and like-wise when clicking in the trough and changing the slider's value by max-step)?
1. You don't really need your callback called for each single increment. You need to modify your callback to be stateless, meaning that whenever it is called it looks at the current slider (scrollbar) value and acts accordingly. This will reduce CPU and actually improve responsiveness/performance.
2. For for another solution, which also solves the continuous trough/max-step request, see this thread: http://www.mathworks.com/matlabcentral/newsreader/view_thread/144980
Yair Altman
http://UndocumentedMatlab.com
|