Re: scrolling and drawing porblems
Re: scrolling and drawing porblems
- Subject: Re: scrolling and drawing porblems
- From: m <email@hidden>
- Date: Mon, 6 Nov 2006 15:23:57 -0800
On Nov 6, 2006, at 3:10 PM, Ivan Kourtev wrote:
I have a custom NSView within an NSScrollView and I want an object
to draw always at the same position relative to the visible
rectangle (not to the bounds). Telling where to draw this object
is not a problem (I can get the visible rectangle and so on). The
problem is that after scrolling, the argument to drawRect can be
just a small rectangle of whatever area was exposed after
scrolling. I guess the graphics buffer is reused to paint the rest
of the visible rectangle so I end up with "ghost" objects."
(not compiled, written in Mail etc)
In your view's awakeFromNib method:
[[[self enclosingScrollView] contentView] setCopiesOnScroll:NO];
_murat
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden