On Mar 19, 2007, at 19:01 UTC, tbuchler wrote: > I'm working on a project with dozens of custom controls built from > canvas with a lot of transparent and translucent effects. I'm able to > get the effects I want, but the whole interface ripples and flickers > when certain controls are updated.
It sounds like you have overlapping Canvases. That's generally a Bad Idea, and I don't recommend it. If your interface is very complex and custom, maybe what you want is a single big Canvas, in which you draw and handle everything. > To get the transparent effect (and as described on this NUG several > weeks ago, and the way I understand this) to alter the appearance of > my transparent control (for example, to achieve a depressed button > look or a rollover glow), I'm do a "me.refresh false" to re > -establish the background, then draw the new graphic. Hmm, I'm surprised that works. Passing False to the Refresh method tells it NOT to erase (re-establish the background) before invoking the Paint event. I never use this method myself, but then again, I hardly ever call Refresh at all. Much better to just draw directly to the canvas.graphics property. > If I've got 20 of these buttons on top of a large canvas, if I do > me.refresh in one button, does that redraw the entire graphic below, > triggering paint on all 20 buttons? Probably, but I wouldn't count on it, nor would I could on it behaving the same on all platforms (or even on the Mac on composite vs. non-composite windows). I recommend not doing this. Remember, a Canvas is just a rectangular portion of a window. Technically, you never need a Canvas at all; it's just a convenience. But when you start nesting them, they get a lot less convenient. Eliminate either the large background Canvas, or the individual button Canvases (and in the latter case, simply draw your buttons in individual regions of the big Canvas). Best, - Joe -- Joe Strout -- [EMAIL PROTECTED] Verified Express, LLC "Making the Internet a Better Place" http://www.verex.com/ _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
