Results 1 to 5 of 5

Thread: [RESOLVED] Hover triggers a change of ForeColor of one ListView row

Threaded View

  1. #1

    Thread Starter
    Junior Member DTML's Avatar
    Join Date
    Mar 2006
    Location
    Duluth, MN, USA
    Posts
    19

    Resolved [RESOLVED] Hover triggers a change of ForeColor of one ListView row

    When "hovering" (MouseMove) over a row in a listview, I would like to temporarily change the ForeColor property of that one row.

    There seems to be an error in the code offered in this post by "anotherVBnewbie":
    http://www.vbforums.com/showthread.p...ricky+listview

    (I get a compiler error, stating that LVM_HITTEST is not defined)

    ...but I think it is on the track towards what I want to do.

    Rather than:

    VB Code:
    1. If (lItemIndex >= 1) And (lItemIndex <= listview.ListItems.Count) Then
    2.    listview.ToolTipText = "whatever you want to tip to be"
    3. Else
    4.    listview.ToolTipText = ""
    5. End If
    I would probably need something like:
    VB Code:
    1. If (lItemIndex >= 1) And (lItemIndex <= listview.ListItems.Count) Then
    2.    listview.ListItems(lItemIndex).ForeColor = &H8080FF
    3. Else
    4.    listview.ListItems(lItemIndex).ForeColor = &HFFFFC0
    5. End If

    Anybody got an easy solution to this?

    TIA,

    Dennis
    Last edited by DTML; Mar 14th, 2006 at 04:18 PM.

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