Solved

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

Posted on 2007-11-21
5
476 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
  • 2
  • 2
5 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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 clear a vector as well as how to detect empty vectors in C++.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now