Scroll bar on App designer
74 views (last 30 days)
Bekay.Kang on 9 Aug 2016
Hope this would be helpful for you!
1) Create a uipanel() on your figure, the size of the viewing area.
2) Create a second uipanel() whose Parent is the first uipanel, and which is big enough to contain all of the data.
3) Draw your images, making sure that their Parent is the second uipanel.
4) Now configure the Callback on your scrollbar so that it changes the Position of the second uipanel. The edges of the first uipanel will "clip" the visibility of the second uipanel so that only the portion of the second uipanel that is behind the "window" that is the size of the first uipanel will be visible.
panel1 = uipanel('Parent',1);
panel2 = uipanel('Parent',panel1);
set(panel1,'Position',[0 0 0.95 1]);
set(panel2,'Position',[0 -1 1 2]);
h = image;
s = uicontrol('Style','Slider','Parent',1,...
'Units','normalized','Position',[0.95 0 0.05 1],...
val = get(src,'Value');
set(arg1,'Position',[0 -val 1 2])