MATLAB: How to make a scrollable figure window using GUIDE in MATLAB 7.7 (R2008b)

MATLAB

I would like to make a GUI using GUIDE which has many uicontrol objects aligned vertically. However I do not want the figure window itself to be too large, so I would like the user to be able to scroll through the contents of the figure window.

Best Answer

The ability to make a scrollable figure window is not available in MATLAB 7.7 (R2008b). An enhacement request has been submitted.
To work around this issue:
1. Create new blank GUI, and use the Property Inspector to set the size to be large enough to fit all of the uicontrols.
2. Add a panel object, and set its 'BorderType' to 'none', 'Title' to an empty string, and its size to match the figure window itself.
3. Add any uicontrol objects inside the panel.
4. Set the figure window size to the desired size the user will see.
5. Add a slider object outside the uipanel.
6. Modify the slider's callback so that it changes the uipanel's position.
See attached documents for an example.
To view the example follow these steps:
1. Open GUIDE by entering the text 'guide' in the MATLAB Command Window and pressing the Enter key.
2. Select the tab 'Open Existing GUI' in the GUIDE Quick Start dialog.
3. Click the button in the lower right of the dialog labelled 'Browse'.
4. Navigate to and select the .fig file to load into GUIDE and click the button in the lower right of the new dialog labelled 'Open'.
5. Once in GUIDE you can start the GUI by clicking the toolbar button with a green triangle and tooltip reading 'Run Figure (Ctrl + T)', or by selecting Run from the Tools Menu, or by using the keyboard shortcut 'Ctrl T'.