Results 1 to 4 of 4

Thread: How do I highlight entire Row in ListView not just text.

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    63

    Question How do I highlight entire Row in ListView not just text.

    Ok here is what I have:

    lstGoToMenu.FullRowSelect = True
    lstGoToMenu.Columns.Item(0).Width = 137
    lstGoToMenu.Items.Add("Test")

    Now when I hover my mouse over the word 'Test' only the letters of the word Test are highlighted. I want the whole row/column space to be highlighted not just the text.

    Second question. i can change the background color and the text color. How can I change the highlight selected color?

    thanks for all you help

    Mythos.

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: How do I highlight entire Row in ListView not just text.

    1. Set the FullRowSelect property to true.

    I'm not sure on #2
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2007
    Posts
    63

    Re: How do I highlight entire Row in ListView not just text.

    I do have full row select set to true. I have it also set to listview not detail because I didn't want the header on top. Any other ideas?

  4. #4
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: How do I highlight entire Row in ListView not just text.

    Quote Originally Posted by Mythos44
    I do have full row select set to true. I have it also set to listview not detail because I didn't want the header on top. Any other ideas?
    Um, FullRowSelect only works with detail. If you want a whole row selected, you should have headers labeling the data otherwise it won't make much sense.

    If you have to do it in ListView... then I guess you'll have to create a custom class and override the draw method and manually do it (i know, i know). That or if there is a way to hide the row from the detailed view.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

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