Results 1 to 5 of 5

Thread: How to add a image in to Listview

  1. #1

    Thread Starter
    Member G0DL1K3's Avatar
    Join Date
    Oct 2008
    Posts
    50

    How to add a image in to Listview

    ok i found this .
    It is in vb6 and its not using any kind of Active x control

    So how did he get the image in there?

  2. #2
    Fanatic Member
    Join Date
    Feb 2001
    Posts
    759

    Re: How to add a image in to Listview

    Place an image inside of an ImageList control.
    Set the ListView Image Lists Tab to use the Small Icon ImageList

    When adding an item to the ListView set the small icon to the image you would like to use from the ImageList control.

    Code:
    Set lvwItem = ListView1.ListItems.Add(, , "ListView Text",,"ImageName")

  3. #3

    Thread Starter
    Member G0DL1K3's Avatar
    Join Date
    Oct 2008
    Posts
    50

    Re: How to add a image in to Listview

    Quote Originally Posted by Ace
    Place an image inside of an ImageList control.
    Set the ListView Image Lists Tab to use the Small Icon ImageList

    When adding an item to the ListView set the small icon to the image you would like to use from the ImageList control.

    Code:
    Set lvwItem = ListView1.ListItems.Add(, , "ListView Text",,"ImageName")
    i'm not talking about the small image... i am talking about the image he got in hes listview

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: How to add a image in to Listview

    Are you talking about adding 'icons' to items in a listview? You will need an ImageList and set the index when adding a listitem to the listview...
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: How to add a image in to Listview

    The listview has a picture property. Set that to the bkg bitmap you want. This presents a problem when the listview is scrolled. Therefore, if the listview will have scrollbars, you want the bitmap to probably be exactly the size of the listivew client area, then set the PictureAlignment property = Tile.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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