Change mouse cursor on hover
5 次查看(过去 30 天)
显示 更早的评论
Is there any way to change mouse cursor on hover to object (to axes for example) in GUI? If I want to change cursor on hover to figure, i should write: set(gcf,'Pointer','hand'); But axes or button don't have such parameter.
Previously grateful for attention.
1 个评论
Adam Danz
2020-6-25
See
along with
which can be used to automatically change the pointer symbol when it hovers over certain objects within the GUI. In regular figures, the pointer manager is supported with figure | axes | uipanel | image objects. As of r2020a, the pointer manager can also be used with uifigures but it seems that only uifigure and uiaxes are supported plus any object plotted within the axes.
回答(2 个)
Walter Roberson
2012-5-6
Work at the figure level, and have the figure mouse movement callback figure out what is "under" the cursor and change the cursor appropriately. (I would suggest that the callback should not just look at the "top" graphics object, and should instead look at the top "hittable" graphics object.)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!