Why is the "ButtonDownFcn" callback for my axes not activated when I click on an object in the axes?
Show older comments
I have an axes that contains several child objects. I have created a "ButtonDownFcn" callback for the axes. However, when I click on the child objects, the axes' "ButtonDownFcn" callback is not executed.
For example, I create an axis with a line using:
h = line;
set(gca,'ButtonDownFcn','disp(''axis callback'')')
when I click on the axis, I see
axis callback
displayed in the command window. However, if I click on the line, nothing occurs.
Accepted Answer
More Answers (0)
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!