MATLAB Creating Graphical User Interfaces

(ff) #1

App That Displays Data in a Hierarchy Using Tree


This app shows how to add a tree to an App Designer app. The app selects data from
patients.xls and displays it in a hierarchy using a tree. The tree contains three nodes
that display hospital names. Each hospital node contains nodes that display patient
names. When the user clicks a patient name in the tree, the Patient Information panel
displays data such as age, gender, and health status. The app stores changes to the data
in the table variable.

In addition to the tree and Patient Information panel, the app also contains the
following UI components:


  • Read-only text field — Used to display the patient’s name

  • Numeric edit field — Used to display and accept changes to the patient’s age

  • Drop-down list — Used to display and accept changes to the patient’s gender and
    health status

  • Check box — Used to display and accept changes to the patient’s smoking history


18 App Designer Examples

Free download pdf