Main Content

Set the UI Window Size in GUIDE

Note

The GUIDE environment will be removed in a future release. After GUIDE is removed, existing GUIDE apps will continue to run in MATLAB® but they will not be editable in GUIDE.

To continue editing an existing GUIDE app, see GUIDE Migration Strategies for information on how to help maintain compatibility of the app with future MATLAB releases. To create new apps interactively, Develop Apps Using App Designer instead.

Set the size of the UI window by resizing the grid area in the Layout Editor. Click the lower-right corner of the layout area and drag it until the UI is the desired size. If necessary, make the window larger.

As you drag the corner handle, the readout in the lower right corner shows the current position of the UI in pixels.

Setting the Units property to characters (nonresizable UIs) or normalized (resizable UIs) gives the UI a more consistent appearance across platforms.

Prevent Existing Objects from Resizing with the Window

Existing objects within the UI resize with the window if their Units are set to 'normalized'. To prevent them from resizing with the window, perform these steps:

  1. Set each object’s Units property to an absolute value, such as inches or pixels before enlarging the UI.

    To change the Units property for all the objects in your UI simultaneously, drag a selection box around all the objects, and then click the Property Inspector button and set the Units.

  2. When you finish enlarging the UI, set each object’s Units property back to normalized.

Set the Window Position or Size to an Exact Value

  1. In the Layout Editor, open the Property Inspector for the figure by clicking the button (with no components selected).

  2. In the Property Inspector, scroll to the Units property and note whether the current setting is characters or normalized.

  3. Click the down arrow at the far right in the Units row, and select inches.

  4. In the Property Inspector, display the Position property elements by clicking the + sign to the left of Position.

  5. Change the x and y coordinates to the point where you want the lower-left corner of the window to appear, and its width and height.

  6. Reset the Units property to its previous setting, as noted in step 2.

Maximize the Layout Area

You can make maximum use of space within the Layout Editor by hiding the GUIDE toolbar and status bar, and showing only tool icons, as follows:

  1. From the View menu, deselect Show Toolbar.

  2. From the View menu, deselect Show Status Bar.

  3. Select File > Preferences, and then clear Show names in component palette

Related Topics