Results 1 to 3 of 3

Thread: strange/annoying listview problem..

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    Hi,

    I have a listview that when I select an item in the list that is not the first item in the list, the first item will allways, momentarily highlight then it will jump to the item that I actually clicked on..

    This is probably something to do with focus but I can't figure it out... Functionally it's not a problem but it just looks plain cheesy!!!!

    Any idea what's causing this?

    Thanks,

    Dan

  2. #2
    New Member
    Join Date
    Jul 2000
    Posts
    14
    Hey Dan,

    I actually posted the same question a while back and didn't get it fixed. Later, I got it working on my own. I have a lot of code in my listView's MouseDown event, but I think this is the part that solves the problem. Let me know if it doesn't and I'll experiment more.

    Basically you want to deselect that first item real quick when the listView gets the focus.


    Dim lvItem As ListItem
    Set lvItem = lvFiles.HitTest(x, y)

    If Not (lvFiles.SelectedItem Is Nothing) Then
    lvFiles.SelectedItem.Selected = False
    Set lvFiles.SelectedItem = Nothing
    End If

    If Not (lvItem Is Nothing) Then
    Set lvFiles.SelectedItem = lvItem
    End If

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    Thanks, will try it out and let you know how it worked..

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