In Delphi, how can I force tListView to always show selected row, even when not focused.

StackOverflow https://stackoverflow.com/questions/8975487

  •  12-11-2019
  •  | 
  •  

Question

The selected row of a tListView appears blue, but only when the control has focus. I'd like the selected row to always be displayed, whether the control has focus or not.

Was it helpful?

Solution

Set the HideSelection property to False.

Determines whether the list view gives a visual indication of which item is selected when focus shifts to another control.

Set HideSelection to false to provide visual feedback of the selected item in the list even when the list view does not have focus. Set HideSelection to true to show the selection only when the list view has focus. HideSelection does not affect the actual value of the selection, only the visual indication. Always setting HideSelection to false can make forms with many list views look too busy.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top