realbasic-nug
[Top] [All Lists]

Re: Should Paint event be passed up hierarchy?

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Should Paint event be passed up hierarchy?
From: Joe Huber <joehuber@talasoft.com>
Date: Thu, 30 Oct 2008 06:27:50 -0700
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Is it correct behavior for a window's
paint event handler to fire because a canvas that covers the window is
refreshed?

Yes, because the canvas may contain transparent regions and that is achieved by having the window first draw it's content and then the canvas can draw it's opaque regions.

I suspect that a better way to achieve what you want is to avoid calling refresh at all and just draw whatever you need directly into the canvas. Unless your canvas content has transparent areas intended to let the window or other controls to show through, this will work much better than messing around with refresh and the flicker that often ensues.

Hope this helps,
Joe Huber

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

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


<Prev in Thread] Current Thread [Next in Thread>