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

2 visualizzazioni (ultimi 30 giorni)
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

Risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by