App Designer: Creating new UIfigure

75 views (last 30 days)
Kathy on 9 Aug 2017
Edited: Michele Guerra on 6 May 2019
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';

Answers (1)

Sangeetha Jayaprakash
Sangeetha Jayaprakash on 14 Aug 2017
I assume you have a 'uifigure' in App designer, and you would like to add components to it.
  1. Above the canvas, to the right hand corner, click "Design View" to go to the design view.
  2. To edit the "uifigure" itself, select the canvas. This "uifigure" properties are seen to the right of the canvas.
  3. To add components to the uifigure, drag the component from the component library to the left of the canvas
If this does not answer your question, briefly describe your workflow.
Michele Guerra
Michele Guerra on 6 May 2019
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!

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!