- Above the canvas, to the right hand corner, click "Design View" to go to the design view.
- To edit the "uifigure" itself, select the canvas. This "uifigure" properties are seen to the right of the canvas.
- To add components to the uifigure, drag the component from the component library to the left of the canvas
App Designer: Creating new UIfigure
29 ビュー (過去 30 日間)
古いコメントを表示
How can I create a new UIfigure in app designer that cn be viewed in "design view". So far I have this that creates a new figure when I run the app. But how can I edit the figure and add components in design view? Thanks!
function CreateNewButtonValueChanged(app, event)
value = app.CreateNewButton.Value;
app.mynewfigure = uifigure;
app.mynewfigure.Name = 'My New Figure';
end
0 件のコメント
回答 (1 件)
Sangeetha Jayaprakash
2017 年 8 月 14 日
I assume you have a 'uifigure' in App designer, and you would like to add components to it.
If this does not answer your question, briefly describe your workflow.
2 件のコメント
René Pätznick
2018 年 10 月 26 日
This was not the question. Look at the code below:
function CreateNewButtonValueChanged(app, event)
value = app.CreateNewButton.Value;
app.mynewfigure = uifigure;
app.mynewfigure.Name = 'My New Figure';
end
He and now also me will add a second uifigure, like a dialog box to the matlab app. But there is no way to design the second uifigure. It seems we have to build a new app with some parameter and start it while the first app is running.
Michele Guerra
2019 年 5 月 6 日
編集済み: Michele Guerra
2019 年 5 月 6 日
I assume what you want to do is to create a simple Dialog with that button, to do so you need to create a new app. You should then call methods on the calling or dialog app as explained quite clearly by this page.
Hope this helped!
参考
カテゴリ
Help Center および File Exchange で Develop uifigure-Based Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!