How to sense if axes is clicked with ButtonDownFcn (GUI)

조회 수: 2 (최근 30일)
Louka Fortin-Sirianni
Louka Fortin-Sirianni 2020년 12월 6일
답변: Sahithi Kanumarlapudi 2020년 12월 16일
Hi,
I'm doing a project and my goal is to do a chess game in matlab's GUI. The problem I'm facing right now is that I can't figure out a way to make the code sense (in real time) if the axes object is clicked on. The best I can do is to implement a pushbutton to display the CurrentPoint on my axes, however, I'd like to make it spontaneous.
I see that with the ButterDownFcn applied on the figure (GUI background) there is a way, since there is a script callback generated for it in the .m file, but not for the specific ButtonDownFcn of the axes object.
I'm not sure if my question is well formulated enough, so let me know if you need more informations, I'd really appreciate it.
Thanks!
  댓글 수: 1
Rik
Rik 2020년 12월 9일
It sounds like you are using GUIDE. I would strongly recommend you do not do that.

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

답변 (1개)

Sahithi Kanumarlapudi
Sahithi Kanumarlapudi 2020년 12월 16일
Hi,
Along with the above suggestion, referring to the similar question at the below link might help you

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by