CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2013
    Posts
    5

    Question How can i change backcolor of a an specific cell from an specific row in listview?

    Hi all
    listview is not able to change the back color of an specific cell from one of it's specific row...
    so i try to write a procedure to support that ability by myself
    the question is it : how to make a procedure with the header below to change cell back color!
    Code:
    Private Sub CellSetBackColor(byref L as ListView, Byval ColIndex as byte, byval C as color)
    .
    .
    .
    .
    End Sub
    thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How can i change backcolor of a an specific cell from an specific row in listview

    Something like this worked for me:

    Code:
    Private Sub ListView1_Click()
      If ListView1.SelectedItem.Index < 0 Then Exit Sub
      SetLIBackColor ListView1, ListView1.SelectedItem.Index, vbRed
    End Sub
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this 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

Featured