Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Chaning the highlight color for a ListView

Posted on 2006-05-11
6
Medium Priority
?
640 Views
Last Modified: 2012-05-05
Hi,

I find the selection color to be too light, when I make a selection in my ListView programmatically.  When I select the ListViewItem with a mouse, it hightlights the selection nicely.

Here's how I select the first item.  What else can I do?

Thanks,
Bob


driverLV.Items[0].Selected = true;
driverLV.Select();
0
Comment
Question by:ba272
6 Comments
 

Author Comment

by:ba272
ID: 16664555
sp:Changing
0
 
LVL 19

Expert Comment

by:Fahad Mukhtar
ID: 16664984
With a normal listview you cannot do this.. you have to develop your own listview control and have this feature
0
 
LVL 1

Expert Comment

by:muratakbar
ID: 16664989
Hi,

I think after the

driverLV.Select();

line another control takes the focus and your listviews HideSelection property is set to false. Inspect your code if another control gets the focus.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

Expert Comment

by:TheAvenger
ID: 16665245
Here is a custom draw list view, maybe it can help you:

http://www.codeproject.com/cs/miscctrl/bk_custlistview.asp
0
 
LVL 19

Assisted Solution

by:Fahad Mukhtar
Fahad Mukhtar earned 800 total points
ID: 16665260
yes its one of them
you can find more here:
http://www.codeproject.com/cs/miscctrl/#ListView+controls

this one is my favourite
http://www.codeproject.com/cs/miscctrl/aa_listview.asp
and i have used it in one of my app
0
 
LVL 11

Accepted Solution

by:
vo1d earned 1200 total points
ID: 16668728
if you are using net 2, you can use the custom draw event.
if you are using net 1, you will have to derive from the listview and go into its wndroc to listen for incoming tvm notify messages.
that is alot of work you will have todo, because you will have to go through 4 different notify stages and do alot of drawing by your own.
i recommend that you are using one of the posted listviews unless you have a good reason, why you would have to go down to win32 api.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question