TGroupBox中的透明背景色-DELPHI [英] Transparent background color in TGroupBox - DELPHI
问题描述
如何在TGroupBox中设置透明背景颜色?
How can i set transparent background color in TGroupBox?
以Delphi的形式,我有一个GroupBox和一个Panel(图形覆盖)。
我编写了一个使用Rect在面板上绘制渐变填充的过程。
现在,我还有另一个问题:GroupBox背景色来自Form,但我希望它与Panel相同。我不能将GroupBox放到Panel中,因为绘制过程会填满整个Panel区域(也是GroupBox)。
有没有一种方法(通过代码)来设置GroupBox的透明背景颜色?
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?
推荐答案
我在运行时解决了设置GroupBox的Parent属性的问题。
I solved setting at runtime the Parent property of the GroupBox.
这篇关于TGroupBox中的透明背景色-DELPHI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!