Reputation: 189
I have a list view that after a double click, a record opens a new form to show the details, but the record in the list view lost the "selection".... How do I know which record was clicked ???
Thanks
Maria João
Upvotes: 12
Views: 14461
Reputation: 20907
Note that the selection will turn "gray" when focus is lost, and "blue" when focused. Keeping it blue when the focus is lost is more difficult ... you'll have to override the ListView::DrawItem
Upvotes: 4
Reputation: 12326
The listview control has a HideSelection property that defaults to True. Set this to False and the current row will remain highlighted even if the control loses focus.
Upvotes: 37
Reputation: 11638
Try setting the HideSelection property on the list view to false. It's enabled by default.
Upvotes: 4