1 Attachment(s)
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:
Attachment 98495
Any help will be appreciated
Re: Creating a List view or flow layout panel with images and labels?
With a FlowLayoutPanel (flp), something along these lines
vb.net Code:
For Each pic In My.Computer.FileSystem.GetFiles("C:\", FileIO.SearchOption.SearchTopLevelOnly, "*.png")
Dim pb As New PictureBox
pb.Height = 75
pb.Width = 75
pb.SizeMode = PictureBoxSizeMode.Zoom
pb.Image = Image.FromFile(pic)
flp.Controls.Add(pb)
Next