Steven Paul wrote:
On Feb 25, 2006, at 7:24 PM, Stefan Pantke wrote:
Am 26.02.2006 um 02:06 schrieb Steven Paul:
In general, you should implement some kind of clipping, since RB
doesn't
implement such a notion: Only redraw the part of a canvas, which
really needs
to be redrawn.
I have a very large picture that I'm only showing a portion of. So I
have a second picture of the same size that I treat as a buffer. When
it's time to redraw, I calculate the rectangle that going to actually
be visible in the canvas, and draw only that part of the picture into
my buffer. Then I draw my stuff on top of that, and then draw the
buffer picture into the canvas, again limiting it to only the visible
portion.
It was pretty fast. Faster than I'd hoped, even.
Now I've added a bunch of other controls to the window. They're
listboxes, about ten of them, each with half a dozen rows or so. Each
box has one row selected. At times I will change the selections
programatically........ hang on. OK, in trying just now to produce a
simple example, I found that I'm updating those controls
unnecessarily. A lot.
Thanks for taking the time to respond. Sorry to waste your time,
though writing this email lead me to the problem.
-Steve
Stefan:
I had a similar problem and managed to sidestep it in a fairly simple
manner.
Define a boolean variable "Painting"
In your paint event :
If Not Painting Then
call you paint redrawing routine
In the redrawing routine the first line will be
Painting = true
Last line: Painting = False
That did it for me.
Regards,
Jim Payne
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>