How can I set a mouseclick callback function to UI controls created with app designer?

2 次查看(过去 30 天)
Hi,
I would like to set a callback function which executes when I click on uilistbox.
f2 = uifigure;
f2.WindowButtonDownFcn = @testCallback1;
list = uilistbox(f2);
list.Items = {'Red','Green','Blue'};
list.WindowButtonDownFcn = @testCallback2;
This code gives me an error as WindowButtonDownFcn apparently doesnt exist for uicontrols created with appdesigner(uifigure).
Is there any solution or callback function which I overlooked?
Thank you very much

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by