In <abz-1209030929190001192.168.1.3> Alain Birtz wrote:Store the drawn computed "large rectange of text and graphics" in an> The view is made with Interface Builder as Custom View and
> the scrollview is build with the "Layout -> Make subview of -> Scroll
> View" menu
> The view hold some text and graphics all done in drawRect method.
> Each time a scroll is needed (mouse click in arrow) drawRect is called.
> But there is no need to redraw anything since there is nothing new (
> text or graphics) in the custom view. Every text and graphics was
> already made in the custom view by the previous drawRect call, even
> the ones that not covered by the scroll rectangle.
> If I force drawRect to do nothing when a mouse click in lower arrow
> happen, an empty rectangle
> appear at the bottom of the view rectangle.
> Is there any way to rebuild text and graphics only when some change
> was made in these text and graphics ?
> My scrolling is too slow because drawRect must compute each time
> a large rectangle of text and graphics. How to do this work only one
> time and just show other part of the text and graphics rectangle when
> scrolling happen ?
NSImage. Now when drawRect is called, just grab the correct part of that
image. Also make sure drawsBackground is set to YES. m.
matt neuburg, phd = [email]matttidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
REALbasic: The Definitive Guide! 2nd edition!
Subscribe to TidBITS. It's free and smart.