appDesigner and ButtonDownFn does not work?
Documentation states that any Matlab object can respond to click events provided they meet certain conditions.
Capturing Mouse Clicks – MATLAB & Simulink (mathworks.com)
In my case, the PickableParts property is not set to ‘None’ and Hit Test property is set to 1, which I’m not sure how to interpret. I use this line of code to set the ButtonDownFn callback:
> set(app.TroisD,’ButtonDownFcn’,@ScatterClickCallback);
app.TroisD is the name of my appDesigner axis object.
When debuging the app, I use this line of code to capture the app.TroisD object:
> Roger = get(app.TroisD);
When I browse the object Ctrl + D, I get this:
To me, this clearly shows that Matlab has honoured my ButtonDownFn callback, and its PickableParts property is not set to ‘None’ and HitTest is set to 1.
I have set some dummy code and a breakpoint in the Callback function code, so that I can inspect the ‘event’ argument:
% Button down function: TroisD
function ScatterClickCallback(app, event)
a = 333;
b = event;
end
Yet, when I run the app and click on the axis, all I get in response to my mouse click is a "beep"?Documentation states that any Matlab object can respond to click events provided they meet certain conditions.
Capturing Mouse Clicks – MATLAB & Simulink (mathworks.com)
In my case, the PickableParts property is not set to ‘None’ and Hit Test property is set to 1, which I’m not sure how to interpret. I use this line of code to set the ButtonDownFn callback:
> set(app.TroisD,’ButtonDownFcn’,@ScatterClickCallback);
app.TroisD is the name of my appDesigner axis object.
When debuging the app, I use this line of code to capture the app.TroisD object:
> Roger = get(app.TroisD);
When I browse the object Ctrl + D, I get this:
To me, this clearly shows that Matlab has honoured my ButtonDownFn callback, and its PickableParts property is not set to ‘None’ and HitTest is set to 1.
I have set some dummy code and a breakpoint in the Callback function code, so that I can inspect the ‘event’ argument:
% Button down function: TroisD
function ScatterClickCallback(app, event)
a = 333;
b = event;
end
Yet, when I run the app and click on the axis, all I get in response to my mouse click is a "beep"? Documentation states that any Matlab object can respond to click events provided they meet certain conditions.
Capturing Mouse Clicks – MATLAB & Simulink (mathworks.com)
In my case, the PickableParts property is not set to ‘None’ and Hit Test property is set to 1, which I’m not sure how to interpret. I use this line of code to set the ButtonDownFn callback:
> set(app.TroisD,’ButtonDownFcn’,@ScatterClickCallback);
app.TroisD is the name of my appDesigner axis object.
When debuging the app, I use this line of code to capture the app.TroisD object:
> Roger = get(app.TroisD);
When I browse the object Ctrl + D, I get this:
To me, this clearly shows that Matlab has honoured my ButtonDownFn callback, and its PickableParts property is not set to ‘None’ and HitTest is set to 1.
I have set some dummy code and a breakpoint in the Callback function code, so that I can inspect the ‘event’ argument:
% Button down function: TroisD
function ScatterClickCallback(app, event)
a = 333;
b = event;
end
Yet, when I run the app and click on the axis, all I get in response to my mouse click is a "beep"? buttondownfn, scatter3, axis, appdesigner MATLAB Answers — New Questions