Recent

Author Topic: [solved] TSplitter in a PageControl  (Read 3636 times)

kapibara

  • Hero Member
  • *****
  • Posts: 656
[solved] TSplitter in a PageControl
« on: December 09, 2013, 10:58:25 pm »
Hi, I have a Treeview and a ListView inside a PageControl. Between them I need a TSplitter.

Now to my question. The color of the TSplitter gets the same color as the PageControl background whatever I do.

Except for the gripper-dots the splitter is invisible and the color cant be changed from the object inspector even if ParentColor := false.

Changing the color at runtime has no effect either.

Is this a bug, or is it just me doing something wrong?

I have Lazarus build 43490 and FPC 2.71

Thanks for any help
« Last Edit: December 12, 2013, 06:29:17 pm by kapibara »
Lazarus trunk / fpc 3.2.2 / Kubuntu 24.04 - 64 bit

kpeters58

  • Sr. Member
  • ****
  • Posts: 267
Re: TSplitter in a PageControl
« Reply #1 on: December 09, 2013, 11:30:18 pm »
I believe that this is just another issue with the pagecontrol component and themes (see the many posts around people wanting to set its color).

If you try the splitter on, say, a form splitting two panels, you will find that it's perfectly capable of accepting a color. So the solutions proposed for color setting on TPagecontrol should also apply to your issue.
Lazarus 2.0.4/FPC 3.0.4/Win 64

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: TSplitter in a PageControl
« Reply #2 on: December 10, 2013, 12:26:42 am »
You can put a TPanel on the TTabSheet and align it alClient.  Make the TPanel the Parent of your controls.  Then you should be able to set the color as you want.
Lazarus Trunk / fpc 2.6.2 / Win32

kapibara

  • Hero Member
  • *****
  • Posts: 656
Re: TSplitter in a PageControl
« Reply #3 on: December 12, 2013, 06:28:52 pm »
Yes, the TSplitter can change colors fine, except when its dropped on a PageControl. So it had to do with themes and is probably not a problem in Linux. Then I found Avishai's method of disabling Themes for the PageControl in an old thread. That worked. Thx!
Lazarus trunk / fpc 3.2.2 / Kubuntu 24.04 - 64 bit

 

TinyPortal © 2005-2018