Change mouse cursor on hover

조회 수: 5 (최근 30일)
doxtar zlo
doxtar zlo 2012년 5월 5일
댓글: Adam Danz 2020년 6월 25일
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
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
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.)

doxtar zlo
doxtar zlo 2012년 5월 6일
Walter Roberson I don't fully understand. You mean tracing coordinates of cursor on the figure and depending of it change cursor?
  댓글 수: 1
doxtar zlo
doxtar zlo 2012년 5월 6일
Thank you for answer. I have decided problem by tracing pointer position and using condition to set cursor type.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile 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!

Translated by