I am using DELPHI AREA's Gradient Shape control but I would like to add 2 additional features.

I am using the control as the base control for a number of custom controls I am building and would like to add a Solid colour fill and a transparent property to the control or implement it in my custom controls. These controls are created at run time and can be deleted at run time.

I can force a Solid fill by setting both begin and end colours to the same, however, in doing so, if I then delete the object the coIor of the parent form is cleared to blank which causes my application to throw and error.I have had no success with implementing a transparent fill.

I have successfully modified Gradient to support style gsSolid, bit of a hack, I set the begin and end colors to be the solid color then call LinearHorizontal. There is probably a much quicker way to do this.

Also have resolved my error on deletion of component.

Just need some ideas on how I might make the component transparent or at least fill with the parent object's color?Unfortunately Parent.color is a protected property and not available directly to the control.

I have finally gotten round to trying out your suggestion.I placed your procedure into the Gradient unit but have a problem compiling it.The TParentControl type is not recognised by the compiler nor are the commands Perform and PaintWindow.Do I have to add additional Namespaces to uses? I am using Delphi 2007.