?
Solved

ListView control, selected item to remain highlighted when control looses focus

Posted on 2007-11-21
5
Medium Priority
?
489 Views
Last Modified: 2013-11-20
I'm using a couple of list controls on the same dialog and I want the selection in the first list control to remain highlighted when I make a selction in the second list control

Thanks
PS, the link to the solutiion to this question preveously asked is not valid anymore.
0
Comment
Question by:EnergyStorage
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 2000 total points
ID: 20329889
Resourrce editor, select the list control
property - show selection always - set it to true (ticked)
0
 

Author Comment

by:EnergyStorage
ID: 20329947
Thanks Andy, I should have know it was so simple, Arrg!
How would I go about setting the selection / not focus selection colours?
Randy
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 20330037
Much more complex  - owner draw or custom draw I think would be what you require.
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 20330067
>>>>> How would I go about setting the selection / not focus selection colours?
That isn't so easy. You need to derive your own list control class from CListCtrl, switch ot owner draw in the resources, replace the class member by your class so that the DoDataExchange can make the subclassing,  supply the DrawItem member function, make all drawing yourself in that function

Regards, Alex
0
 

Author Comment

by:EnergyStorage
ID: 20330137
Thanks guys,
Ok thanks, I've done the more complex list control using the XListCtrl demo from the Code Project
http://www.codeproject.com/listctrl/xlistctrl.asp

I just thought there might be an easy way to change the colours used.
Randy
0

Featured Post

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!

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

764 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