ButtonDownFcn and WindowButtonMotionFunction on a GUI
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
Using this tutorial I have succeeded in making a crosshair follow the motion of my mouse when I click the left button. However I have only been able to do this in a regular figure, and have had problems implementing it on my GUI. I tried specifying the axes I want it to show on, because my GUI, made with GUIDE, has three axes figures, but it will show on the whole window. I'm assuming the WindowButtonMotionFcn works on the whole window. I know there is a buttondown callback for the axes, but what about for mouse movement? In short, I want to be able to program an action on clicking and dragging on any of the axes drawn in my GUI.
Thank you
0 Commenti
Risposte (1)
Jan
il 15 Lug 2015
The WindowButtonDownFcn and WindowButtonMotionFcn concern the complete window (as the name implies). But you can check the coordinates of the pointer in these callbacks easily and limit the motion to the position of wanted axes object using some min and max calls.
Vedere anche
Categorie
Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!