ListView Remove Highlight

SeeOne
SeeOne used Ask the Experts™
on
Is there any way to remove the highlighting in a listview when an item is clicked besides using .SetFocus to another control?

It flickers beyond belief and I hate flicker.  An API solution is preferred, but if there is a simpler way of doing it without the flicker I would love to know.

Thanks in advance everyone.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
I work with listviews all the time, but I couldn't find a way either.  Because of this, I'd like to ask...why would you want to remove the highlighting?  Maybe there's another UI strategy so you don't have worry about listview highlighting.

Also, as a side note...do you not want ANY highlighting, or do you not want the reverse blue/gray background with white text highlighting?  Would you be happy with a shaded outline?

Author

Commented:
A border would be fine - but I wish to remove the actual highlight when clicked.  The reason for this is because I do not like how images are shaded when an object is selected.

I know I could use an image for one column and then the contents in another, but then the space between the two columns is more than I want.

Author

Commented:
If there was a way to make a border solid, that would also be excellent.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Ryan ChongSoftware Team Lead

Commented:
Try check the HideSelection Property of ListView?

Author

Commented:
HideSelection property only removes the highlight once another control is focused.  What I want is the control to have no highlight whatsoever, focused or not.
Commented:
Got it!  For an outline only, do the following

Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
    ListView1.SelectedItem.Selected = False
End Sub

Its a gray outline, not a solid black, but its a strong enough outline that any user should be able to figure out whats going on

Author

Commented:
Superb.  Simple, yet effective, thanks a lot.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial