Click here to Skip to main content
Rate this: bad
good
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 at 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 at 12-Dec-12 0:21am
   
Quite true.
Espen Harlinn at 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
0 Sergey Alexandrovich Kryukov 420
1 OriginalGriff 230
2 DamithSL 135
3 Dave Kreskowiak 110
4 Suvendu Shekhar Giri 110
0 OriginalGriff 7,740
1 DamithSL 5,644
2 Sergey Alexandrovich Kryukov 5,404
3 Maciej Los 5,011
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 2 Dec 2012
Copyright © CodeProject, 1999-2014
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