Main Content

Developing UI Component Classes

Author your own class of custom UI component objects

Define your own UI component class by creating a subclass of the ComponentContainer base class. If you write scripts or functions for creating specialized UIs and visualizations and share them with others, consider creating a class implementation. Creating a class enables you to provide a convenient interface for your users. When they want to customize aspects of your UI Component, they can set properties rather than having to modify and rerun your code. You design your own custom set of properties and control which ones your users can access. Users can modify properties at the command line or inspect them in the Property Inspector.


matlab.ui.componentcontainer.ComponentContainer Base class for developing UI component objects


setupSet up instance of component container subclass
updateUpdate instance of UI component container subclass after setting properties


UI Component Development Overview

Learn the basic steps for authoring a class of UI component objects.