Recent

Author Topic: [SOLVED] ListView Row Select - broken background color on empty cell  (Read 1949 times)

SassyPenguin

  • New Member
  • *
  • Posts: 49
Hello, I don't know if this is a bug or I am lack of some code, someone please enlighten me...

ListView with OwnerData, RowSelect option. But the background color is not displayed on empty cell. Please see screen shot and the sample project.

« Last Edit: October 18, 2021, 07:41:59 am by jamestien »
Lazarus 2.2.4 (Win11, Manjaro KDE, CachyOS KDE, Linux Mint)

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: ListView Row Select - broken background color on empty cell
« Reply #1 on: October 12, 2021, 09:18:16 pm »
I would love to help you but on this PC I have 2.0.4 installed and it seems the TlistView has issues using the OwnerData option so its hard for me to assist.

 But I would suggest using the OwerDraw or maybe one of the other OnCustomDraw events to set background colors during an empty cells so that it gets painted correctly.. Of course you would need to know the color for the highlight, that looks like it's using standard colors for that.
The only true wisdom is knowing you know nothing

ASerge

  • Hero Member
  • *****
  • Posts: 2222
Re: ListView Row Select - broken background color on empty cell
« Reply #2 on: October 12, 2021, 09:32:45 pm »
ListView with OwnerData, RowSelect option. But the background color is not displayed on empty cell. Please see screen shot and the sample project.
Lazarus 2.2.0RC1 x64 - OK.

SassyPenguin

  • New Member
  • *
  • Posts: 49
Re: ListView Row Select - broken background color on empty cell
« Reply #3 on: October 13, 2021, 03:21:08 am »
Thank you for the reply ASerge, jamie.

Looks like it is Lazarus bug, tested same code on Delphi 10.4 and it worked like it should. Will try to install & test on Lazarus 2.2RC1.
Lazarus 2.2.4 (Win11, Manjaro KDE, CachyOS KDE, Linux Mint)

SassyPenguin

  • New Member
  • *
  • Posts: 49
Re: ListView Row Select - broken background color on empty cell
« Reply #4 on: October 13, 2021, 04:00:58 am »
Quote
Lazarus 2.2.0RC1 x64 - OK.

Confirmed that it is fixed on Lazarus 2.20RC1.
« Last Edit: October 13, 2021, 06:27:40 am by jamestien »
Lazarus 2.2.4 (Win11, Manjaro KDE, CachyOS KDE, Linux Mint)

 

TinyPortal © 2005-2018