"Boris " <bmateev@ymail.com> wrote in message
news:ke6jed$li2$1@newscl01ah.mathworks.com...
>> Boris,
>>
>> The WindowsScrollWheelFcn for the figure is the right thing to use. If
>> you want the scroll wheel to "operate" multiple sliders, you'd have to
>> have a way to select which slider to "operate." You could either use the
>> last slider touched or perhaps use the slider closest to the current
>> pointer position. In any case, just program the scroll wheel function to
>> run the same (or similar) function as the slider. It won't be connected
>> to the slider, it'll just do the same thing. You can have it update the
>> slider, too, if you want by setting the slider value.
>>
>> --
>> Doug Schwarz
>> dmschwarz&ieee,org
>> Make obvious changes to get real email address.
>
> Thanks for the response Doug.
>
> I have code implementing WindowScrollWheelFcn working now, however I have
> to create a new figure to use the function. From there I edit my slider
> position based off the scroll wheel movements inside the new figure.
> The problem is that I want the scroll panel to move when the mouse is
> moved over the uicontrol slider, not some random figure that I am not even
> using. I tried making a WindowScrollWheelFcn callback in the uicontrol,
> but an error said that uicontrols do not have such a field.
> So I guess my question is is it possible to use the WindowScrollWheelFcn
> without having any figure, just uicontrol objects?
If you have uicontrol objects, you DO have a figure -- the figure in which
the uicontrols are located. Set the WindowScrollWheelFcn for that figure
(you can use ANCESTOR with the slider handle to locate that figure's handle
if you don't have access to it for whatever reason.)
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com