Code covered by the BSD License  

Highlights from
Scrollbar GUI Example

image thumbnail
from Scrollbar GUI Example by Juergen Reimers
GUI with a working scrollbar, that moves other GUI elements.

slider.m
%read the value of the slider
slidervalue=get(hpop,'Value');

%change the position of hpanel, all children of hpanel are moved as well
%'+1' because of change of slider start position

set(hpanel,'Position',[pos(1) pos(2)-slidervalue+1 pos(3) pos(4)]);

Contact us at files@mathworks.com