Results 1 to 2 of 2

Thread: Creating a List view or flow layout panel with images and labels?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2013
    Posts
    30

    Creating a List view or flow layout panel with images and labels?

    Hey everyone

    I am currently trying to find out a way in which I can fill a list view or flow layout panel with images and labels in a structured manner. The reason for this is that the list view or flow layout panel gets filled with images from a server, and when the user clicks on the image a new form opens up with information about the item (above or below I would like there to be a label with the name of the item however I'm not to bothered about that right now).

    At the minute I just want to be able to get the component to load a set of images from any directory (I'll sort out getting the images from the server after). Below is one example of how I wouldn't mind it looking:

    Name:  ListView Image Shadows and Image Borders_original_1298622678.png
Views: 3929
Size:  129.2 KB

    Any help will be appreciated

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Creating a List view or flow layout panel with images and labels?

    With a FlowLayoutPanel (flp), something along these lines

    vb.net Code:
    1. For Each pic In My.Computer.FileSystem.GetFiles("C:\", FileIO.SearchOption.SearchTopLevelOnly, "*.png")
    2.             Dim pb As New PictureBox
    3.             pb.Height = 75
    4.             pb.Width = 75
    5.             pb.SizeMode = PictureBoxSizeMode.Zoom
    6.             pb.Image = Image.FromFile(pic)
    7.             flp.Controls.Add(pb)
    8.         Next
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width