Link to home
Start Free TrialLog in
Avatar of mscientist33
mscientist33

asked on

"Insert" a thumbnail in an imagelist without having to reload the whole imagelist

I have an imagelist that is loaded with thumbnails. It is created on the fly using a mutilpage tiff file that is loaded in a leadtools image viewer.  The imagelist then populates a listview control for use as a thumbnail control that allows drag and drop, rearranging of pages, delteteing a page ,and adding a page by use of scanner.  I have all working, but if they make any changes in the listview, I have to clear the imagelist, then reload it completely. The multipage tiff can have as many as 3000 pages in it and it takes way to long to clear and reload everytime the user makes a change.  Is there a way to "Insert" a image into an imagelist instead of add?  I also have tried using a panel control with the following code:

Dim x As Integer
        For x = 1 To riv1.Image.PageCount
            riv1.Image.Page = x
            mypic = riv1.Image.ConvertToGdiPlusImage
            Pic = New PictureBox
            Pic.Height = 100
            Pic.Width = 100
            Pic.Top = PosLeft
            Pic.BorderStyle = BorderStyle.Fixed3D
            Pic.Left = 10
            Pic.Image = mypic
            Pic.SizeMode = PictureBoxSizeMode.StretchImage
            Txt = New TextBox
            Txt.Enabled = False
            Txt.BorderStyle = BorderStyle.FixedSingle
            Txt.Multiline = True
            Txt.Top = Postop + 100
            Txt.Left = Pic.Left
            Txt.Width = 100
            Txt.Height = 24
            Txt.TextAlign = HorizontalAlignment.Center
            Txt.Text = "Page " & x
            Postop += 150
            PanelPictureStrip.Controls.Add(Pic)
            PanelPictureStrip.Controls.Add(Txt)

        Next x
this works fine, but now I dont know how to actually click on the pictureboxes that are created.  It needs to Highlight like a normal thumbnail (or page) control with drag and drop capabilites. Either of these fixes will be fine (even though I would rather the fix for the imagelist as I have already got the rest of the functionality working :))

Or even a FREE thumbnail control that doesn't rely on using an imagelist.

Thanks,

ASKER CERTIFIED SOLUTION
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mscientist33
mscientist33

ASKER

Worked Like a charm, very fast with the large multipage tiff's.  Thanks!