Creating Graphical User Interfaces | ![]() ![]() |
User-Specified Resize Operation
You can create GUIs that accommodate resizing, while at the same time maintain the appearance and usability of your original design by programming the figure ResizeFcn
callback routine. This callback routine essentially recalculates the size and position of each component based on the new figure size.
This approach to handling figure resizing is used most typically in GUI-based applications that require user interaction on an ongoing basis. Such an application might contain axes for displaying data and various components whose position and size are critical to the successful use of the interface.
Property Settings
GUIDE sets the following properties to implement this style of GUI:
Units
properties of the figure, axes, and uicontrols should generally be set to characters
so the GUI displays at the correct size at runtime. Resize
figure property set to on
(the default).ResizeFcn
figure property requires a callback routine to handle resizing.See The Address Book Resize Function for an example of a user-written resize function.
![]() | Allowing Proportional GUI Resizing | Command-Line Accessibility | ![]() |