Click here to Skip to main content
15,946,657 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
After one item is selected in listview, selected mark dissapear as I click other button or space
maybe I think focus is gone also.

Is there any listview style that doesn't lose selected mark even though user click other space?
I couldn't find it in msdn, please give me advice
Posted
Comments
Richard MacCutchan 2-Dec-12 7:33am    
If you click elsewhere then you are taking the focus away from the ListView, so why would it retain it?

List-View Window Styles[^]

You probably need to specify LVS_SHOWSELALWAYS when you create the control.

Best regards
Espen Harlinn
 
Share this answer
 
Comments
Wendelius 12-Dec-12 0:21am    
Quite true.
Espen Harlinn 12-Dec-12 9:38am    
Thank you, Mika :-D
Set the HideSelection property[^] of the ListView to false and the selection should always be displayed even when the ListView does not have the focus.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900