- Change the default pointer for a uifigure or app
- Change the pointer dynamically when it meets certain conditions
- Create your own pointer symbol
How do I change the pointer property on a UI Figure?
17 views (last 30 days)
Show older comments
I have an appdesigner gui in Matlab 2018b that has a callback for a listbox that plots a set of data on a set of axes adjacent to it. The callback calls a function and I want to change the pointer properties such that upon the clicking of a new data set, it changes the mouse to watch.
I tried
set(gcf, 'Pointer', 'watch');
And that creates a new figure, which is not the functionality I want.
I tried:
set(myUIHandle, 'Pointer', 'watch');
That didn't work either saying UIFigures have no such property
I also tried iptPointerManager to no avail.
Is there no current solution for this in the current version of matlab? Are there no workarounds to this?
0 Comments
Accepted Answer
Adam Danz
on 12 Dec 2019
Edited: Adam Danz
on 25 Jun 2020
As of r2019b the Pointer functionality is not supported for UIFigures. However, you'll notice that there is a Pointer property for UIFigures and it does not throw an error when the pointer is set to 'arrow' which is the default and only accepted value.
app.UIFigure.Pointer = 'arrow';
This suggests that pointer options may be coming as App Designer features continue to be rolled out.
update: Now supported in r2020a
Pointer control is now supported in UIFigures and Apps as of r2020a.
See this community highlight to learn how to
2 Comments
Davi Carvalho
on 15 Aug 2021
Hello, is it possible to do the opposite to what the OP asked and keep Matlab from changing the cursor automatically?
For example, every time the user gets closer to a point drawn with the drawpoint() function, the pointer changes to 'fleur', I'd like to keep it as 'arrow' at all times, can it be done?
Adam Danz
on 15 Aug 2021
Edited: Adam Danz
on 15 Aug 2021
Yes it's possible. I show how to do that in this answer .
More Answers (0)
See Also
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!