Main Content

uifigure-Based Apps

Develop apps programmatically using UI figures designed for app building (uifigure function)

Design and edit apps programmatically by coding their layout and behavior using MATLAB® functions. The uifigure function creates a figure that is specially configured for app building and serves as the container for your user interface. UI figures support the same types of modern graphics and interactive UI components that App Designer supports.


expand all

uifigureCreate figure for designing apps
uigridlayoutCreate grid layout manager
uipanelCreate panel container
uitabgroupCreate container for tabbed panels
uitabCreate tabbed panel
uiaxesCreate UI axes for plots in apps
axesCreate Cartesian axes
geoaxesCreate geographic axes
polaraxesCreate polar axes

Common Components

uibuttonCreate push button or state button component
uibuttongroupCreate button group to manage radio buttons and toggle buttons
uicheckboxCreate check box component
uidatepickerCreate date picker component
uidropdownCreate drop-down component
uieditfieldCreate text or numeric edit field component
uihyperlinkCreate hyperlink component
uiimageCreate image component
uilabelCreate label component
uilistboxCreate list box component
uiradiobuttonCreate radio button component
uisliderCreate slider component
uispinnerCreate spinner component
uitable Create table user interface component
uitextareaCreate text area component
uitogglebuttonCreate toggle button component
uitreeCreate tree or check box tree component
uitreenodeCreate tree node component

Figure Tools

uicontextmenuCreate context menu component
uimenuCreate menu or menu items
uipushtoolCreate push tool in toolbar
uitoggletoolCreate toggle tool in toolbar
uitoolbarCreate toolbar in figure

Instrumentation Components

uigaugeCreate gauge component
uiknobCreate knob component
uilampCreate lamp component
uiswitchCreate slider switch, rocker switch, or toggle switch component

Extensible Components

uihtmlCreate HTML UI component

Tree Node

expandExpand tree node
collapseCollapse tree node
moveMove tree node

Scrollable Components

scrollScroll to location within component

Context Menu

openOpen context menu at location within UI figure

Table or Tree

uistyleCreate style for table or tree UI component
addStyleAdd style to table or tree UI component
removeStyleRemove style from table or tree UI component
uialertDisplay alert dialog box
uiconfirmCreate confirmation dialog box
uiprogressdlgCreate progress dialog box
uisetcolorOpen color picker
uigetfileOpen file selection dialog box
uiputfileOpen dialog box for saving files
uigetdirOpen folder selection dialog box
uiopenOpen file selection dialog box and load selected file into workspace
uisaveOpen dialog box for saving variables to MAT-file


expand all

UI Figure PropertiesControl UI figure appearance and behavior for uifigure-based apps
GridLayout PropertiesControl grid layout manager behavior
Panel PropertiesControl panel appearance and behavior
TabGroup PropertiesControl tab group appearance and behavior
Tab PropertiesControl tab appearance and behavior
UIAxes PropertiesUI axes appearance and behavior
Axes Properties Axes appearance and behavior
GeographicAxes PropertiesControl geographic axes appearance and behavior
PolarAxes PropertiesPolar axes appearance and behavior

Common Components

Button PropertiesControl button appearance and behavior
ButtonGroup PropertiesControl button group appearance and behavior
CheckBox PropertiesControl check box appearance and behavior
CheckBoxTree PropertiesControl check box tree appearance and behavior
DatePicker PropertiesControl date picker appearance and behavior
DropDown PropertiesControl drop-down list appearance and behavior
EditField PropertiesControl edit field appearance and behavior
Hyperlink PropertiesControl hyperlink appearance
Image PropertiesControl image component appearance and behavior
Label PropertiesControl label appearance
ListBox PropertiesControl list box appearance and behavior
NumericEditField PropertiesControl numeric edit field appearance and behavior
ProgressDialog PropertiesControl progress dialog box appearance and behavior
RadioButton PropertiesControl radio button appearance
Slider PropertiesControl slider appearance and behavior
Spinner PropertiesControl spinner appearance and behavior
StateButton PropertiesControl state button appearance and behavior
Table PropertiesControl table UI component appearance and behavior
TextArea PropertiesControl text area appearance and behavior
ToggleButton PropertiesControl toggle button appearance
Tree PropertiesControl tree appearance and behavior
TreeNode PropertiesControl tree node appearance and behavior

Figure Tools

ContextMenu PropertiesControl context menu appearance and behavior
Menu PropertiesControl menu appearance and behavior
PushTool PropertiesControl push tool appearance and behavior
ToggleTool PropertiesControl toggle tool appearance and behavior
Toolbar PropertiesControl toolbar appearance and behavior

Instrumentation Components

DiscreteKnob PropertiesControl discrete knob appearance and behavior
Gauge PropertiesControl gauge appearance and behavior
Knob PropertiesControl knob appearance and behavior
Lamp PropertiesControl lamp appearance
LinearGauge PropertiesControl linear gauge appearance and behavior
NinetyDegreeGauge PropertiesControl ninety-degree gauge appearance and behavior
RockerSwitch PropertiesControl rocker switch appearance and behavior
SemicircularGauge PropertiesControl semicircular gauge appearance
Switch PropertiesControl switch appearance and behavior
ToggleSwitch PropertiesControl toggle switch appearance and behavior

Extensible Components

HTML PropertiesControl HTML UI component appearance and behavior
Style PropertiesStyle for table or tree UI component


Learn the Basics of Programmatic App Building

Create and Run a Simple Programmatic App

Step through the process of creating a simple app programmatically.

App Building Components

View samples of the UI components available for building modern apps.

Ways to Build Apps

Choose an app building approach that best suits your project requirements and your preferred workflow.

Customize App Appearance

Lay Out Apps Programmatically

Manage the size, location, and front-to-back order of components programmatically.

Manage App Resize Behavior Programmatically

Manage the default automatic resizing behavior for programmatic apps.

Programmatic App that Displays a Table

Create a table UI component and modify its appearance and behavior programmatically.

Program App Behavior

Write Callbacks for Apps Created Programmatically

Write callbacks to control the behavior of apps you create programmatically.

Share Data Among Callbacks

Manage and share data in your app using different techniques.

Interrupt Callback Execution

Learn how to control whether callbacks can be interrupted by other callbacks.

Related Information