Results 1 to 3 of 3

Thread: ImageList

  1. #1
    Guest

    Post

    Is there a way to use a picturebox with a listview. They normally use an imagelist to get its smallicon, but i need to get it from a picturebox. I've tried listview1.listitems.add ,,"text",,picture1.picture but it didnt work. Please let me know if you have any idea what im talking about

  2. #2
    Addicted Member
    Join Date
    May 1999
    Location
    Californ-I- A
    Posts
    207

    Post

    You could always load an Image List with your picturebox's picture ...


    Dim LI as ListImage
    Dim LV as ListItem

    'Add picture to image list
    Set LI = ImageList1.ListImages.Add(, "NewPicture", Picture1.Picture)

    ListView1.SmallIcons = ImageList1 'Initialize List

    'Add new listview item with new picture
    Set LV = ListView1.ListItems.Add(,"NewItem","This is a new item",,"NewPicture")

    Micah Carrick
    Visual Basic 6 SP5
    Visual Basic.NET
    Quixotix Software
    [email protected]
    Download QCM 1.0 - Intelligent ActiveX Control Management

  3. #3
    Guest

    Post

    Thank you, that code was exactly what i was looking for

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