How can I add a mouse movement listener to a custom ui component?
Hello everyone,
I have created a MatLab app that uses mousemovement events. It uses the WindowButtonMotion callback of the UIFigure that was described here https://nl.mathworks.com/matlabcentral/answers/775147-how-to-create-mouse-movement-event-on-uiaxes-in-app-designer-to-catch-cursor-location-on-the-axes in the answer (Method 2) by Adam Danz
The app works nicely. However, now that the project is evolving, I would like to convert the App to a Custom UI Component. But MatLab components do not seem to include a UIFigure, and therefore no WindowsButtonMotion event/callback. The Custom UI Component itself (comp) and UIAxes do not have a WindowButtonMotion event.
What I would like is a mousemovement event/callback/listener that calls a function so that I can check the mouse position against criteria and take appropriate action. This seems like very common functionality, but I cannot figure out how to accomplish this in a Custom UI Component.
Any ideas?Hello everyone,
I have created a MatLab app that uses mousemovement events. It uses the WindowButtonMotion callback of the UIFigure that was described here https://nl.mathworks.com/matlabcentral/answers/775147-how-to-create-mouse-movement-event-on-uiaxes-in-app-designer-to-catch-cursor-location-on-the-axes in the answer (Method 2) by Adam Danz
The app works nicely. However, now that the project is evolving, I would like to convert the App to a Custom UI Component. But MatLab components do not seem to include a UIFigure, and therefore no WindowsButtonMotion event/callback. The Custom UI Component itself (comp) and UIAxes do not have a WindowButtonMotion event.
What I would like is a mousemovement event/callback/listener that calls a function so that I can check the mouse position against criteria and take appropriate action. This seems like very common functionality, but I cannot figure out how to accomplish this in a Custom UI Component.
Any ideas? Hello everyone,
I have created a MatLab app that uses mousemovement events. It uses the WindowButtonMotion callback of the UIFigure that was described here https://nl.mathworks.com/matlabcentral/answers/775147-how-to-create-mouse-movement-event-on-uiaxes-in-app-designer-to-catch-cursor-location-on-the-axes in the answer (Method 2) by Adam Danz
The app works nicely. However, now that the project is evolving, I would like to convert the App to a Custom UI Component. But MatLab components do not seem to include a UIFigure, and therefore no WindowsButtonMotion event/callback. The Custom UI Component itself (comp) and UIAxes do not have a WindowButtonMotion event.
What I would like is a mousemovement event/callback/listener that calls a function so that I can check the mouse position against criteria and take appropriate action. This seems like very common functionality, but I cannot figure out how to accomplish this in a Custom UI Component.
Any ideas? windowbuttonmotion, custom ui component, app designer MATLAB Answers — New Questions