Jonnster
Jonnster

Reputation: 3242

.NET WinForms ListView Selected Item Not Highlghted

How can I setup a ListView in a WinForm so that when an item is selected it is not highlighted? i.e. no blue background.

Upvotes: 0

Views: 709

Answers (3)

Libor
Libor

Reputation: 3303

Better ListView allows you to display each item in custom state (compliant to current Windows Theme) or with completely custom look - this goes beyond HideSelection property, which is available as well:

enter image description here

enter image description here

There is also free Better ListView Express with less features.

Upvotes: 0

Grammarian
Grammarian

Reputation: 6882

ObjectListView -- an open source wrapper around a .NET ListView -- allows you to choose which colors you want the selected items to have. So you can set the highlighting background color to be the same as the ListView, and just change the foreground color. As David H pointed out, you will have to do something different with the selected rows!

In the following shot, the selected row has a darker background and lighter text color:

enter image description here

Upvotes: 1

David Heffernan
David Heffernan

Reputation: 613461

Are you looking for HideSelection?

If you want the selected item not to be highlighted even when the list view has the focus, then that's going to be pretty confusing for the users and would require some custom painting.

Upvotes: 0

Related Questions