* * *

Author Topic: VirtualTreeview black header  (Read 1649 times)

JD

  • Hero Member
  • *****
  • Posts: 1608
VirtualTreeview black header
« on: May 27, 2017, 07:49:05 pm »
Hi there everyone,

I use VirtualTreeview 5.5.3 and for a while now I've noticed a black patch on the header when Header.Options.hoVisible := True

Is there anyway I can hide the black patch or at least change it's colour to white? The screenshot is shown below

Thanks,

JD
Windows (10, 7) - Lazarus 1.8/FPC 3.0.4, NewPascal, Delphi
Linux Mint Cinnamon  - Lazarus 1.8/FPC 3.0.4, NewPascal
Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB

zeljko

  • Hero Member
  • *****
  • Posts: 938
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: VirtualTreeview black header
« Reply #1 on: May 27, 2017, 08:02:59 pm »
Looks like canvas is assigning Color (clDefault) instead of GetColorResolvingParent()

JD

  • Hero Member
  • *****
  • Posts: 1608
Re: VirtualTreeview black header
« Reply #2 on: May 27, 2017, 08:43:53 pm »
Looks like canvas is assigning Color (clDefault) instead of GetColorResolvingParent()

So what should I do to correct it?
Windows (10, 7) - Lazarus 1.8/FPC 3.0.4, NewPascal, Delphi
Linux Mint Cinnamon  - Lazarus 1.8/FPC 3.0.4, NewPascal
Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB

zeljko

  • Hero Member
  • *****
  • Posts: 938
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: VirtualTreeview black header
« Reply #3 on: May 27, 2017, 09:15:12 pm »
Check VirtualTrees.pas sources at the place where header is painted ?

GetMem

  • Hero Member
  • *****
  • Posts: 2465
Re: VirtualTreeview black header
« Reply #4 on: May 28, 2017, 06:12:12 am »
Hi JD,

Although I cannot reproduce it(image1), it looks like a painting issue as @Zeljko already mentioned. Until you find out what causes the issue, just choose your main column(usually the first one) and set autoresize to true(image2). I'm aware that this is just a workaround not a solution, but it might work for you.
« Last Edit: May 28, 2017, 06:24:14 am by GetMem »

JD

  • Hero Member
  • *****
  • Posts: 1608
Re: VirtualTreeview black header
« Reply #5 on: May 28, 2017, 09:45:42 pm »
Thanks GetMem. AutoSizing a column hides the black header patch.

JD
Windows (10, 7) - Lazarus 1.8/FPC 3.0.4, NewPascal, Delphi
Linux Mint Cinnamon  - Lazarus 1.8/FPC 3.0.4, NewPascal
Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 456
Re: VirtualTreeview black header
« Reply #6 on: May 29, 2017, 06:51:02 pm »
Still interested in fixing it.

What OS are you using?

The example is just drop a VirtualTreeView into an empty project?

JD

  • Hero Member
  • *****
  • Posts: 1608
Re: VirtualTreeview black header
« Reply #7 on: May 30, 2017, 02:31:26 am »
Still interested in fixing it.

What OS are you using?

The example is just drop a VirtualTreeView into an empty project?

Windows 7 and yes I just dropped a VirtualTreeView onto an empty project and chose to display column headers.

JD
Windows (10, 7) - Lazarus 1.8/FPC 3.0.4, NewPascal, Delphi
Linux Mint Cinnamon  - Lazarus 1.8/FPC 3.0.4, NewPascal
Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus