on 2/18/07 4:42 PM, Tom Buchler at [EMAIL PROTECTED] wrote:

> Environment: WinXP.
> 
> I'm working on transparent controls based on Canvas.
> 
> There are times I need to clear the control. When my control is pasted
> on (and entirely enclosed within) a larger, say red, colored Rectangle,
> control order of the Rectangle set to 0, and I clear the canvas using
> Graphics.ClearRect, instead of making my control effectively invisible
> on a red background, RB clears my canvas down to the parent window's
> fillcolor, leaving a grey hole where my control sits.
> 
> Is this behavior I should expect, or a bug. If the former, how do I
> clear the canvas so that the parent rectangle's color (or a parent's
> image) shows?

This is the expected behaviour. If you're a transparent control and want to
erase yourself you should be invalidating the control and letting all of the
controls underneath you redraw. If does mean that you need some kind of flag
in your control that you can check in your Paint event to control whether or
not you draw.

Chris


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to