Results 1 to 3 of 3

Thread: [RESOLVED] Adding images to a listview row

  1. #1

    Thread Starter
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Resolved [RESOLVED] Adding images to a listview row

    Hi,

    I want to add to display a star rating in a listview row.
    Is it possible?

    Thanks.
    Delete it. They just clutter threads anyway.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Adding images to a listview row

    To display an Image in a ListView you are supposed to create an ImageList and add your Images to that. You assign that ImageList to the appropriate property of the ListView and then set the ImageIndex or Imagekey property of each item. The ImageList does have limitations though, so it may or may not work for what I assume would be non-square Images. Give it a go and see if it works first, then we can look elsewhere if it doesn't.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Adding images to a listview row

    As you mentioned, I thought the ImageList had limitation in image sizing, but apparently not (at least for the control-version, that is).
    It does limit me in the way that I can't add images to a subitem, but it'll do for now.

    Thanks
    Delete it. They just clutter threads anyway.

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