3

How can i set transparent background color in TGroupBox?

In my Delphi's form I have a GroupBox and a Panel (graphically overlaid).
I wrote a procedure to draw a gradient fill on the Panel using Rect. It works!
Now I have another problem: GroupBox backgound color descends from the Form but I wish it was the same of Panel. I can't put GroupBox into Panel because draw procedure fill the entire Panel area (also GroupBox).
Is there a way (by code) to set trasparent background color of GroupBox?

stacker
  • 603
  • 4
  • 10
  • 15

2 Answers2

0

set parentcolor of the groupbox to true

Ravaut123
  • 2,764
  • 31
  • 46
  • ParentColor property is already set to True. But as I said the parent of the GroupBox is the Form not the Panel. I solved setting at runtime the Parent property of the GroupBox. So GroupBox take the background color of Panel. – stacker Nov 09 '12 at 11:18
0

I solved setting at runtime the Parent property of the GroupBox.

stacker
  • 603
  • 4
  • 10
  • 15