Recent

Author Topic: Back color of TPanel not equals to back color of Form  (Read 4590 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2384
    • UVviewsoft
Back color of TPanel not equals to back color of Form
« on: November 09, 2018, 08:35:05 pm »
I post screenshot of About window with TButtonPanel component.
If using color picker - you ll see that TBUttonPanel back color not the same as form color.
How to fix?
Ubuntu 18.4 x64.

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Back color of TPanel not equals to back color of Form
« Reply #1 on: November 09, 2018, 09:14:53 pm »
TButtonPanel is TCustomPanel descendant, I guess TPanel has also different color than TForm. Maybe it depends on color settings of your system.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Back color of TPanel not equals to back color of Form
« Reply #2 on: November 09, 2018, 10:13:47 pm »
Use two panels?

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Back color of TPanel not equals to back color of Form
« Reply #3 on: November 09, 2018, 11:10:42 pm »
Mint 19, FPC3.2.0, Laz 2.1.0 does not show this color discrepancy (which is mysterious in your case, since TCustomPanel's constructor sets ParentColor to True).

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Back color of TPanel not equals to back color of Form
« Reply #4 on: November 10, 2018, 12:43:36 am »
Check in the Object Inspector whether the Color property of the TButtonPanel is set to anything other than clDefault; barring bugs in the LCL, that's AFAIK the only way you could be seeing that effect.

FWIW, it works OK here: Kubuntu 14.04, Lazarus 1.8.4-GTK2.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

AlexTP

  • Hero Member
  • *****
  • Posts: 2384
    • UVviewsoft
Re: Back color of TPanel not equals to back color of Form
« Reply #5 on: December 13, 2018, 08:57:30 am »
Of course, ButtonPanel's color is clDefault (no line in LFM file).

 

TinyPortal © 2005-2018