Path: news.mathworks.com!not-for-mail
From: "Vihang Patil" <vihang_patil@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Displaying images on GUI
Date: Sun, 3 Feb 2008 08:23:03 +0000 (UTC)
Organization: Konem Solutions
Lines: 26
Message-ID: <fo3tl7$fqm$1@fred.mathworks.com>
References: <fo11jj$652$1@fred.mathworks.com> <fo17kq$9ru$1@fred.mathworks.com> <fo28sr$nto$1@canopus.cc.umanitoba.ca>
Reply-To: "Vihang Patil" <vihang_patil@yahoo.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1202026983 16214 172.30.248.35 (3 Feb 2008 08:23:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 3 Feb 2008 08:23:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 413701
Xref: news.mathworks.com comp.soft-sys.matlab:448991


roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in 
> 
> imscrollpanel is only for a single image, not for displaying
> multiple images.

Dear Walter
Well, imscrollpanel with montage can be used to achieve the
OP's requirement
Try the following code

str = 'C:\Documents and Settings\All Users\Documents\My
Pictures\Sample Pictures'; %change this to reflect your
desired picture directory
result = dir(fullfile(str,'/*.jpg'));
for i = 1 : length(result)
    img(:,:,:,i) = imread([str '\' result(i,1).name]);
end
hFig = figure('Toolbar','none',...
              'Menubar','none');
hIm = montage(img);
hSP = imscrollpanel(hFig,hIm);
set(hSP,'Units','normalized',...
        'Position',[0 .1 1 .9]);

Regards
Vihang