Panel Gradient Color

I have a TAdvPanel with a vertical color gradient and on it a TFrame with some controls.

I have given up trying to make the frame transparent and instead have put another TAdvPanel on the frame and am trying to synchronize the colors of the 2 frames. Is there a reasonably simple way of doing this? I checked for a "ColorAtClientY" type function in the panel, but couldn't find anything.

I'm sorry, unfortunately, there is at this moment not a built-in function, ColorAtClientY() or similar with which you could pick up the color at a specific coordinate.

OK, Bruno. I found a function in the AdvPanel unit called BlendColor that seems to do what I need (if not exactly then close enough). It was reasonably straightforward to write a ColorAtClientY function based on it (once I realised that Color1 and Color2 are the opposite of what I first assumed!)

1 Like