Recent

Author Topic: ListView is showing icons for each column on Windows in Lazarus 2.0.4  (Read 379 times)

LazProgger

  • Jr. Member
  • **
  • Posts: 91
I have compiled an old project on Lazarus 2.04 that was working when it was compiled with Lazarus 1.6.4.

The problem occurs with a listview with ViewStyle = vsReport, OwnerData = true and an ImageList assigned to SmallImages. The images are set via Item.ImageIndex to the items.

When compiled with 1.6.4 on and for Win32 and Win64 the images where shown only once at the beginning of each row. When compiled with 2.0.4 on Win32 and Win64 the images are shown in front of each cell, that means not only at the beginning of each row but additionally also in front of each of the sub item.

How can I bring back the old behavior? Is that a bug or has there been introduced a new property or something like that I have to change?


ASerge

  • Hero Member
  • *****
  • Posts: 1412
Re: ListView is showing icons for each column on Windows in Lazarus 2.0.4
« Reply #1 on: August 23, 2019, 03:54:45 am »
How can I bring back the old behavior? Is that a bug or has there been introduced a new property or something like that I have to change?
New property TListItem.SubItemImages[const AIndex: Integer]: Integer;
But...it has a bug with OwnerData, even it decision, but unfortunately ignored by administrators.
« Last Edit: August 23, 2019, 01:40:12 pm by ASerge »

LazProgger

  • Jr. Member
  • **
  • Posts: 91
Re: ListView is showing icons for each column on Windows in Lazarus 2.0.4
« Reply #2 on: August 23, 2019, 06:55:30 pm »
Thank you very much! I expected something like that. Then I do not have to create an own bug report for that.

I have manually copied your patch to my win32wscustomlistview.inc and it's working like expected after recompiling the IDE. I hope your patch will be applied before the next Lazarus release.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3646
  • I like bugs.
Re: ListView is showing icons for each column on Windows in Lazarus 2.0.4
« Reply #3 on: August 23, 2019, 08:46:01 pm »
I applied the patch. Thanks.
My development OS is not Windows and I didn't pay attention to the report earlier.