Results 1 to 4 of 4

Thread: Listview Control

  1. #1

    Thread Starter
    Hyperactive Member dRAMmer's Avatar
    Join Date
    Oct 2001
    Location
    strangelans
    Posts
    463

    Listview Control

    I want to change the color of my listview. I would like to have a two tone color for my listitems. Anyone? As much as possible, I refrain from using third party controls. If it's possible with listview then your help is highly appreciated.

    Could we do this using API?
    live, code and die...

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    No APIs needed :

    VB Code:
    1. Dim lvItem As ListItem
    2.  
    3. Set lvItem = ListView1.ListItems.Add(, , "yay")
    4. lvItem.ListSubItems.Add , , "2"
    5. lvItem.ListSubItems.Add , , "visual basic"
    6. Set lvItem = ListView1.ListItems.Add(, , "yay2")
    7. lvItem.ListSubItems.Add , , "2"
    8. lvItem.ListSubItems.Add , , "visual basic"
    9.  
    10. ListView1.ListItems(1).ForeColor = vbRed
    11. ListView1.ListItems(1).ListSubItems(1).ForeColor = vbMagenta
    12. ListView1.ListItems(1).ListSubItems(2).ForeColor = vbGreen


    Has someone helped you? Then you can Rate their helpful post.

  3. #3

    Thread Starter
    Hyperactive Member dRAMmer's Avatar
    Join Date
    Oct 2001
    Location
    strangelans
    Posts
    463
    Thanks.

    But what I want to change is the backcolor property (each listitem)which is not a property of litview.
    live, code and die...

  4. #4
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171


    Has someone helped you? Then you can Rate their helpful post.

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