필터 지우기
필터 지우기

How to restrict the ButtonDown callback to only the UIAxis part of the figure?

조회 수: 3 (최근 30일)
Hi,
I am creating an app which has multiple components in the figure. One of the functionalities I would like to have is to draw some curves in response to clicking on points in the UIAxis part of the figure. It seems that the way to go for this should be done via the UIFigureWindowButtonDown callback, but this executes at times which I don't want it to, e.g. when I am writing down parameters in edit fields.
What would be the recommended workaround?

채택된 답변

Vinayak
Vinayak 2022년 10월 18일
If you observe the documentation closely for the UIFigureWindowButtonDown callback, it executes whenever a uiaxes component is triggered even though uiaxes components do not support the ButtonDownFcn property.
The following documentation link may be helpful in giving more insight about callbacks.
https://www.mathworks.com/help/matlab/ref/matlab.ui.figureappd-properties.html
  댓글 수: 2
Leon
Leon 2022년 10월 18일
The issue is not that it does not trigger when I click on the uiaxis, but that it triggers when I click on other parts of the figure. What I want is for it to activate only when I click on the uiaxis.
Vinayak
Vinayak 2022년 10월 19일
Check out the following documentation pertaining to a similar query,
https://www.mathworks.com/matlabcentral/answers/458264-using-windowbuttondownfcn-in-app-designer

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by