List of photos

kohle

Active Member
Licensed User
Longtime User
Hi,

I want to show a list of photos.

I tried something with one photo but it seems that an imagelist
is a nonvisual object. How can I realize to see a list of photos,
they must be resized to fit.

My test:

imageEdit.New1
Image1.LoadPicture(AppPath & "\cray1.jpg")
ImageEdit.LoadImage (image1.Image)
ImageEdit.Resize(40,40)
Image1.Image = ImageEdit.GetImage("c")
ImageEdit.Saveimage (AppPath & "\th_cray1.jpg","J")
imagelist1.Add("th_cray1.jpg")
 

klaus

Expert
Licensed User
Longtime User
You don't need to resize the photos.
To fit the photo into the image controls you just need to set their ImageMode property to cStretchImage.

Attached a small example.
The images are stored in an ImageList control. You can Add, Insert, Remove and RemoveAt to manage the photolist.
With ImageList.Width(i) and ImageList.Height(i) you know the size of the original image.
In the example the thumnail images are square even thoug the original images are not. But you could adapt the width/height ration if you want.

Best regards.
 

kohle

Active Member
Licensed User
Longtime User
This helps to understand. Thanks very much.

But my aim was to have serveral photos in a list,
where i can scroll up and down.

Ok, I can programm something with one image and
a previous and next button to "move"
 

klaus

Expert
Licensed User
Longtime User
You could also use a certain number if Image controls on the form and a next and previous button to update the images or use a big Panel with a size bigger than the form and scroll the Panel with a ScrollBar and changing the Top property.

But I agree with Ariel that the bList would be the nicest solution. I have never used it yet.

Best regards.
 

kohle

Active Member
Licensed User
Longtime User
blist works great !
kind of iphone feeling on wm.

Thanks a lot for your help
 

klaus

Expert
Licensed User
Longtime User
Hi Ariel,
Don't be surprised, I don't always test all new possibilities.
I test, and mostly use them, when I have a concrete need or oportunity, I didn't have one during the last time. But I will for shure test it and probably use it.
You will hear from me.

Best regards.
 

Ariel_Z

Active Member
Licensed User
I know... I was joking, I'm sure I will have your feedback when you try it and I am looking forward to it - I'm sure there are many things to learn from things you will say. Of course I did not mean that you can check anything on the forum. Thanks!
 
Top