Results 1 to 2 of 2

Thread: Coloring the Listview

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    Greece
    Posts
    164

    Coloring the Listview

    Hi,

    does anybody know how to color the listview cells individually (report mode) ? For example, if anyone is using ZoneAlarm, will notice that ZoneAlarm features a very cool listview where the background color of various cells can be painted.

    Using the sendmessage API I managed to paint an entire row, but I want to paint only selected cells.

    Also, how to change color for the highlight bar ?


    If anyone can help, please take the time to do so.

    Thanks,
    Hyperspaced


    PS: It would be great if someone could explain in brief the procedure to create a similar listview to ZoneAlarm. I think that ZoneAlarm is using a GREAT listview which could make VB apps ALOT prettier.

  2. #2
    Hyperactive Member
    Join Date
    May 2001
    Location
    Beirut, Lebanon
    Posts
    318
    Maybe there's a simpler way to do what you want. But, here a way I used to change the fonts in some cells.


    Your application has to Capture the WM_NOTIFY message that the listbox send to your form.
    then you have to call a function that you'll write, in which you select the draw stage you want to customize, and then draw it the way you like.

    You have to know some Subclassing, and how to use windows structures.

    See MSDN (Custom Draw) it may help you.

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