How do I implement Scroll-Bars to scroll through my huge GUI in MATLAB 7.6 (R2008a)?

17 views (last 30 days)
I created a huge GUI with GUIDE. To make it more easy to look through the GUI I would like to use Scroll-Bars. Is there a way to do this?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 May 2018
You can do this by following these steps:
1) GUIDE:
* Create the GUI
2) GUIDE generated MATLAB-Code:
* Shrink the GUI to a good size and adjust the size of the Scrollbar
* Create a list of all objects to be moved
* Save the original positions of the objects in the GUI
3) GUIDE generated MATLAB-Code, Slider-Callback:
* Get the actual position of the Slider
* Add the Y-Value to the Y-Value of the object positions
Please Note the following:
1) Slider
* Units are "characters"
* The "max" value determines the range of scrolling. This value needs to be high enough!
2) Objects:
* Units are "pixels"
Please see the attached files which provide this example!
If you need a Scroll-Bar for the X-Axis this could be done similarly.

More Answers (0)

Products


Release

R2008a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!