How do I use a uimenu callback in a programmatically created figure within app designer?

I've got an app that when a certain condition is met, pops out a programmatically created figure repleat with buttons, checkboxes, axes, etc... (Full disclosure) I first created it as a simple script and now I'm trying to integrate that into the app (the appdesigner kept crashing and took A LOT of time to run and work out bugs). I understand the syntax will be a little different in appdesigner, but I cannot seem to find any answers about how to point to a function from, say, a uimenu. CODE BELOW.
ContextSelection1 = uimenu(Context,'Label','Select Region Data','Callback',@FillEdits);
Is there a workaround or different syntax that should be used here?

3 件のコメント

Kevin Chng
Kevin Chng 2018 年 8 月 2 日
Hi,
Let say that you use Menu Bar from component library. In your left hand bottom, it allows you to label the name and callback function. Then, you copy your script of FillEdit Function into the column of function in the code view.
I'm not sure is it the things you are looking for?
Regards, Kevin Chng
Kevin Chng
Kevin Chng 2018 年 8 月 2 日
Or you may try to use this tool for your conversion.
https://www.mathworks.com/matlabcentral/fileexchange/66087-guide-to-app-designer-migration-tool-for-matlab
Yuhao Sun
Yuhao Sun 2020 年 8 月 24 日
You can try the context menu from the component liabray. R2020a version has supported it in the app designer.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品

リリース

R2018a

質問済み:

2018 年 8 月 1 日

コメント済み:

2020 年 8 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by