Results 1 to 5 of 5

Thread: Icons and listview.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    Icons and listview.

    HI, i am trying to load a list of files and paths into a listview, and then have a little icon of the fileicon next to it. How would i do this. I should use this (lin below) code to get the icon, but im not sure how to place it next to the aprropate item in the listview.

    http://www.codeguru.com/csharp/cshar...cle.php/c4261/

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: Icons and listview.

    insert the icons in an image list and set the listview's image list property to that. (there are separate ones for small icons, large icons etc.)
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    Re: Icons and listview.

    Doesnt that make each items have that pic?

  4. #4
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: Icons and listview.

    well no
    each listItem has a ImageIndex property. Set it to -1 to have no image associated with it, or set it to the index of the image in the corresponding imagelist
    sorry I'm tired.. and vague maybe shouldnt have replied to start with
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    66

    Re: Icons and listview.

    Ok, I cant get it, Example code?

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