Results 1 to 2 of 2

Thread: [RESOLVED] Set listview subitem forecolor

  1. #1

    Thread Starter
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 2010
    Location
    Wales UK
    Posts
    814

    Resolved [RESOLVED] Set listview subitem forecolor

    Hi I have a listview two colums I am trying to set the forecolor of the subitem I tryed this as a test but not seem to work

    Code:
    LstItems.Items(1).SubItems(1).ForeColor = Color.Blue

    I even tryed in my loop with setting the subitem but still nothing
    Code:
    lvItem.SubItems.Add(State, Color.Red, Color.White, Nothing)
    Any ideas?

  2. #2

    Thread Starter
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 2010
    Location
    Wales UK
    Posts
    814

    Re: Set listview subitem forecolor

    I think I fixed it needed to use

    Code:
         lvItem.UseItemStyleForSubItems = False
         'Add sub item.
          lvItem.SubItems.Add(State, Color.Red, Color.White, Nothing)

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