Main Content

appdesigner.customcomponent.configureMetadata

Configure custom UI component for use in App Designer

Since R2021a

    Description

    appdesigner.customcomponent.configureMetadata(classfile) opens a dialog box to configure App Designer metadata for the UI component class specified by classfile. This metadata enables the component to appear in the App Designer Component Library and be used interactively in the canvas.

    The function generates a folder named resources that contains the metadata. Share this folder when you share your UI component.

    example

    Examples

    collapse all

    Use the App Designer Custom UI Component Metadata dialog box to configure an existing UI component class for use in App Designer.

    Assume you created a subclass of the matlab.ui.componentcontainer.ComponentContainer base class and saved the class file as IPAddressComponent.m in the folder C:\MyComponents. Launch a dialog box to configure the IPAddressComponent for use in App Designer.

    appdesigner.customcomponent.configureMetadata("C:\MyComponents\IPAddressComponent.m")

    App Designer Custom UI Component Metadata dialog box. The dialog box lists the component file and provides fields for customizing the component metadata. The Component Library Appearance section contains fields for the component name, category, and icon. The Component Details section contains fields for the component description, version, author's name, and author's email. The bottom of the dialog box shows Help, OK, and Cancel buttons.

    Fill out the form, then select OK. The function generates a folder named resources with the specified metadata in the C:\MyComponents folder. Add C:\MyComponents to the MATLAB® path and open an app in App Designer to see your component in the Component Library.

    Input Arguments

    collapse all

    Path to the UI component class file, specified as a character vector or string scalar. classfile can be an absolute or relative path.

    Example: 'C:\MyComponents\IPAddressComponent.m'

    Example: "IPAddressComponent.m"

    More About

    collapse all

    Version History

    Introduced in R2021a