I want to make a panel in my system translucent, like the AlphaBlend property but this property is only available to Tform and not Tpanel. How do I make the panel translucent.
Prior to Windows 8, child controls cannot have the WS_EX_LAYERED window style applied to them. That is why non-TForm components do not have AlphaBlend or TransparentColor properties. What you are asking for it not possible using standard components as-is. Even if you created a custom owner-drawn component, you would still be fighting the system, because you would have to drawn onto the component's Parent to achieve the desired effect. You can try looking around for a third-party solution, but you are not likely to find very many options, as using translucent child controls is not a very common practice.
With that said, one simple option you could try is to put the TPanel on a separate borderless captionless translucent TForm, position the panel TForm over the area of the parent TForm where you want the TPanel to appear (but do not set the panel TForm's Parent property or this exercise will not work) and then move the panel TForm in sync with the parent TForm whenever it moves around.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With