List of photos

Discussion in 'Questions (Windows Mobile)' started by kohle, Oct 28, 2009.

  1. kohle

    kohle Active Member Licensed 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")
     
  2. klaus

    klaus Expert Licensed 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.
     
  3. kohle

    kohle Active Member Licensed 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"
     
  4. Ariel_Z

    Ariel_Z Active Member Licensed User

  5. klaus

    klaus Expert Licensed 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.
     
  6. kohle

    kohle Active Member Licensed User

    blist works great !
    kind of iphone feeling on wm.

    Thanks a lot for your help
     
  7. Ariel_Z

    Ariel_Z Active Member Licensed User

    Klaus, I'm surprised... :) I really would like to hear your opinion when you have the time to try it!
     
  8. klaus

    klaus Expert Licensed 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.
     
  9. Ariel_Z

    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!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice