Bookstore

Recent

Author Topic: No inidicator in TListview when listview component has no focus.  (Read 224 times)

mangakissa

  • Hero Member
  • *****
  • Posts: 980
No inidicator in TListview when listview component has no focus.
« on: February 24, 2020, 09:27:52 am »
When a listview has focus, an indicator (bar) shows which item is selected. But when another component like TEdit has focus the indicator is gone. So you can't see which item is selected.

How do I manage this to see the selected item.

I'm using Lazarus 2.06 64b / FPC 3.04 Windows 10
Lazarus 2.06 (64b) / FPC 3.0.4 / Windows 10
stucked on Delphi 10.3.1

wp

  • Hero Member
  • *****
  • Posts: 6824
Re: No inidicator in TListview when listview component has no focus.
« Reply #1 on: February 24, 2020, 09:48:35 am »
There's a property HideSelection which unfortunately defaults to true. Set it to false and you'll see the selection also when a different control has focus. The same holds true for TTreeView.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

mangakissa

  • Hero Member
  • *****
  • Posts: 980
Re: No inidicator in TListview when listview component has no focus.
« Reply #2 on: February 25, 2020, 03:49:36 pm »
Thanks WP. I've never heard of it. Defently not in Delphi. It's good to know
Lazarus 2.06 (64b) / FPC 3.0.4 / Windows 10
stucked on Delphi 10.3.1

wp

  • Hero Member
  • *****
  • Posts: 6824
Re: No inidicator in TListview when listview component has no focus.
« Reply #3 on: February 25, 2020, 04:17:37 pm »
Defently not in Delphi.
Wrong - Delphi is where I first stumbled across this insanity, and Lazarus had to follow.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10