Customize Wheel Scroll fxn to work within axes in figure?
Mostrar comentarios más antiguos
Hello, thanks for reading this,
I was wondering, is it possible to create a WindowScrollWheelFcn event exclusive to a axes within a figure I create within a UI? As in, when I cross over the axes in the UI I create and THEN scroll down, I do the callback. Otherwise, I do not activate the callback.
I was thinking I could check the mouse position when I do it in a figure, and if its in the domain of the axes, then do the WindowScrollWheelFcn callback, otherwise do nothing. Would this be the way to go about doing this?
Thanks for your help!
Respuesta aceptada
Más respuestas (2)
Brian
el 16 de Jul. de 2014
1 comentario
Joseph Cheng
el 17 de Jul. de 2014
yes. so the first set for the windowscrollwheefcn will perform what will be after. Before I implemented the mouse positioning i used the windowbuttonupfcn to find which axes was last selected. but i realized you want to utilize the mouse positioning to determine which axes is hovered not clicked.
Brian
el 16 de Jul. de 2014
2 comentarios
Joseph Cheng
el 17 de Jul. de 2014
yes exactly, in my second comment where I included the mouse positioning, it calls for the function scrollfunc() where you can do something else. I just use plot(rand) as a temporary do something function.
Brian
el 17 de Jul. de 2014
Categorías
Más información sobre Graphics Object Properties en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!