Display Multiple Images in Pages GUI

3 views (last 30 days)
Irene Anthi
Irene Anthi on 20 Feb 2015
Answered: Adam on 20 Feb 2015
Hi, I am currently working on a GUI and I am looking for a way to load and display all the .jpg images from a directory.
However I would like to display them in pages ? For example each page will contain 10 images and then I will use "Previous" and "Next" buttons to navigate between pages...
Any idea ?
Thanks a lot !

Accepted Answer

Adam
Adam on 20 Feb 2015
You can create 10 axes on a panel or straight on the figure.
Then show the first 10 by default. When you click next replace the 'CData' property of the images with the 11-20th images and so on. Alternatively you can just make sure the 'hold' property of the axes are off and do a full replot for the 11th to 20th images.
Changing the 'CData' is generally quicker, but you have to keep hold of the 10 image handles and there may be other properties that need to change for a new image which make it easier to just replot instead.

More Answers (0)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!