clicking on data tips option breaks WindowButtonDown callback

23 Ansichten (letzte 30 Tage)
Juan Jose
Juan Jose am 7 Nov. 2024 um 21:42
Beantwortet: Walter Roberson am 7 Nov. 2024 um 22:19
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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 7 Nov. 2024 um 22:19
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.

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by