|
-
Sep 24th, 2000, 10:03 PM
#1
Thread Starter
Frenzied Member
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
-
Sep 24th, 2000, 11:03 PM
#2
New Member
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
-
Sep 24th, 2000, 11:13 PM
#3
Thread Starter
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|