clicking on data tips option breaks WindowButtonDown callback

I'm defining a callback for clicks like this:
app.UIFigure.WindowButtonDownFcn = @(src, ~) disp("asda");
initially, it works just fine. Inside UIFigure i have an axes with some points scattered on it, when i click on the data tip option in the axes toolbar, then the next click does not trigger the callback. Any ideas on why is this happening or how could i debug this?

 채택된 답변

Walter Roberson
Walter Roberson 2024년 11월 7일

2 개 추천

This is expected. Data tips rely upon WindowButtonDownFcn and there can only be one WindowButtonDownFcn active at a time on any component.
You could potentially customize the datatip response to execute your code as well.
You could potentially listener or addlistener to respond to events.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품

릴리스

R2024b

태그

질문:

2024년 11월 7일

답변:

2024년 11월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by