Results 1 to 10 of 10

Thread: listview row color

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2010
    Posts
    1,462

    listview row color

    Can the backcolor vary for any row ?

    If yes, how is this done so all coloumns are included?

    Thanks, ABB

  2. #2
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: listview row color

    No, I don't think it can. The only property I can see for colour options for the ListItem and SubItems is 'ForeColor'.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2010
    Posts
    1,462

    Re: listview row color

    Thanks Doogle, global is has to be then.

    Regards, ABB

  4. #4

  5. #5
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,375

    Re: listview row color

    You could take the ListView control from my CommonControls replacement project.
    Click here.

    It supports a BackColor (via the "ItemBkColor" event) for the ListItems. (and many other features more)
    Last edited by Krool; Jun 2nd, 2013 at 03:35 PM.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2010
    Posts
    1,462

    Re: listview row color

    Thanks Krool and Rhino. I've just downloaded both files and will have a go. Might struggle a bit but here's hoping!

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2010
    Posts
    1,462

    Re: listview row color

    I have both examples working but to be honest can't see how to implement them with what I have.
    I populate all the rows before the Form opens, and wanted to assign the color then depending on the source for each row.

    The Hidden row thing threw me, and Krool yours is way beyond me!
    But thanks for the offer.

  8. #8
    Member
    Join Date
    Jan 2021
    Posts
    46

    Re: listview row color

    Quote Originally Posted by Krool View Post
    You could take the ListView control from my CommonControls replacement project.
    Click here.

    It supports a BackColor (via the "ItemBkColor" event) for the ListItems. (and many other features more)
    Hello all,

    I searched the forum. I have not found any example code to use the above referred method to change the backcolor of any desired row.

    Can someone help me?

  9. #9
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: listview row color

    1. Welcome to the Forum
    2. This is a real old thread you have opened. It would be better if you could start a NEW thread, describe what you are trying to do, and if desired, put a link to this thread in it (or any thread that you think we could view to better understand what you are trying to do).
    3. Did not the link provided in post # 4 guide you enough? Is THAT what you are trying to do? That link is self-explanatory, IMO.

    Sammi
    Sam I am (as well as Confused at times).

  10. #10
    Member
    Join Date
    Jan 2021
    Posts
    46

    Re: listview row color

    Quote Originally Posted by SamOscarBrown View Post
    1. Welcome to the Forum
    2. This is a real old thread you have opened. It would be better if you could start a NEW thread, describe what you are trying to do, and if desired, put a link to this thread in it (or any thread that you think we could view to better understand what you are trying to do).
    3. Did not the link provided in post # 4 guide you enough? Is THAT what you are trying to do? That link is self-explanatory, IMO.

    Sammi
    I have opened a new thread
    https://www.vbforums.com/showthread....cture-property

    I have also answered query on #4

    Regards

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