MATLAB Creating Graphical User Interfaces

(ff) #1
Add UI Components to App Designer Programmatically
........................................... 15-
Create the Component and Assign the Callback..... 15-
Write the Callback........................... 15-
Example: Confirmation Dialog Box with a Close Function
....................................... 15-
Example: App that Populates Tree Nodes Based on a Data
File .................................... 15-

App Layout


16


Lay Out Apps in App Designer..................... 16-
Customizing Components....................... 16-
Aligning and Spacing Components................ 16-
Grouping Components......................... 16-
Arranging Components in Containers.............. 16-

Managing Resizable Apps in App Designer........... 16-
Resizing Components with Normalized Position Units
........................................ 16-
Disabling Automatic Resizing ................... 16-
Customizing Resize Behavior Using a SizeChangedFcn
Callback................................. 16-

Using Grid Layout Managers..................... 16-
Example: Hide Rows Based on Run-Time Conditions.. 16-

Apps with Auto-Reflow.......................... 16-
Auto-Reflow Behavior......................... 16-
Example: Using Apps with Auto-Reflow............ 16-

App Programming


17


Managing Code in App Designer Code View .......... 17-
Managing Components, Functions, and Properties.... 17-

xiii
Free download pdf