Recent

Author Topic: Splitter will not display it's set color if on a TPageControl  (Read 2137 times)

RedOctober

  • Sr. Member
  • ****
  • Posts: 452
I have attached a small sample project.  If some one could tell me what I'm doing wrong.  I need to know how to get my splitter to show the color I set, even when it's on a TTabSheet of a TPageControl.

At the moment, it shows color if it's on the TForm, but not if it's on a TTabSheet.  Let me know if this is a bug and if so, I'll type up a bug report.


Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: Splitter will not display it's set color if on a TPageControl
« Reply #1 on: April 08, 2018, 04:59:58 pm »
I tested the code on Lazarus 1.8.0 Gtk2 Linux. I didn't see any color, all I got is grey. For you information, my clActiveCaption is green.

RedOctober

  • Sr. Member
  • ****
  • Posts: 452
Re: Splitter will not display it's set color if on a TPageControl
« Reply #2 on: April 08, 2018, 08:22:03 pm »
I keep forgetting to include my platform:

I'm on Lazarus 1.8.2, FPC 3.0.4, running on Windows Server 2016 Essentials.

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Splitter will not display it's set color if on a TPageControl
« Reply #3 on: April 08, 2018, 08:53:51 pm »
You can try to create a child class and override the paint method

Or check parent color property

RedOctober

  • Sr. Member
  • ****
  • Posts: 452
Re: Splitter will not display it's set color if on a TPageControl
« Reply #4 on: April 08, 2018, 11:11:37 pm »
I've made a bug report.

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Splitter will not display it's set color if on a TPageControl
« Reply #5 on: April 08, 2018, 11:29:22 pm »
I've made a bug report.

Good luck with that  :) Usually it takes forever.

In the meantime I made a fix, that you can use.

Note: Do it propperly please, change Splitter2 with TSplitter(Sender).Whatever...

 

TinyPortal © 2005-2018