Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 493
  • Last Modified:

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

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
EnergyStorage
Asked:
EnergyStorage
  • 2
  • 2
1 Solution
 
AndyAinscowCommented:
Resourrce editor, select the list control
property - show selection always - set it to true (ticked)
0
 
EnergyStorageAuthor Commented:
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
 
AndyAinscowCommented:
Much more complex  - owner draw or custom draw I think would be what you require.
0
 
itsmeandnobodyelseCommented:
>>>>> 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
 
EnergyStorageAuthor Commented:
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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now