Board index » off-topic » Re: Writing Transparent controls which are to contain transparent controls.
Re: Writing Transparent controls which are to contain transparent controls.
2007-10-02 06:14:44 AM
I tried the example controls you supplied, although they do work and
clearly demonstrate transparency, they have some issues which mean they are
not of much use to me as they stand. Firstly they cause a lot of display
artifacts when placed onto a form and dragged around at designtime. Secondly
when moved at runtime, the appear to have grabbed a copy of whatever is
behind them so the display gets badly distorted.
I am beginning to suspect that the cause of my issue that TWinControl
introduces a painting mechanism which erases the background and it is this
mechanism that is causing my problem. ie obscuring what is behind the
I am thinking that the best solution (not ideal) would be to derive a
new control from TWinConrol and override the default painting mechanism to
replace it with my own version which doesnt erase the background.
I'll have a go at this now to see if it works... If you do have any
other ideas or suggestions i'd still like to hear them.
Thanks and Kind Regards