Is it possible to build custom UI components in app designer that can be visually re-used in app designer?

I would like to build a series of custom compound ui components from the common components in app designer, and then make the custom ui components available as drag and drop components in app designer. Perhaps something as simple as creating a container, populating the container with common components, and then saving the container as a ui*** component that can be visually selected from a component library in app designer.
Fundamentally, does this level of flexibility to create and manage custom ui components exist yet in app designer?

4 Comments

I am not aware of that functionality, but you can of course create ui components programmatically and pass the handles back to your app.
Thanks Dennis - confirms what I thought. I'll take the programmatic approach, but hoping to find a way to create WYSIWYG custom component libraries in AppDesigner. That would be a very useful bit of functionality, though perhaps for too small an audience
You can aswell create your components in one app, group your elements and copy & paste them to different apps.
Hi, did you find a way to do so?
I wanted to inherit a panel class, and in this subclass I can already put other controls, finally to reuse this panel in main figure across different programs.
But seems I cannot inherit `matlab.ui.container.Panel`, error prompt saying something like "class not in the allowance list".

Sign in to comment.

 Accepted Answer

As of R2020b you can author a custom UI component and add it to an App Designer app programatically (i.e. it is not possible to add it to the Component Library in the App Designer canvas). You can use this class to create reusable components across multiple apps.

1 Comment

Update: as of R2021a, you can register custom ComponentContainer classes with the component library in App Designer.
appdesigner.customcomponent.configureMetadata('C:\MyComponents\ColorSelector.m');

Sign in to comment.

More Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Asked:

on 24 Jun 2019

Commented:

on 18 Apr 2021

Community Treasure Hunt

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

Start Hunting!