Click here to Skip to main content
12,623,511 members (33,920 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++ API
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 1-Dec-12 22:53pm
kyleK89363
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?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

List-View Window Styles[^]

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

Best regards
Espen Harlinn
  Permalink  
Comments
Mika Wendelius 12-Dec-12 0:21am
   
Quite true.
Espen Harlinn 12-Dec-12 9:38am
   
Thank you, Mika :-D
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.161128.1 | Last Updated 2 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100