Re: scrollRangeToVisible
Re: scrollRangeToVisible
- Subject: Re: scrollRangeToVisible
- From: Jonathon Mah <email@hidden>
- Date: Sun, 13 May 2007 03:23:43 +0930
Hi Gerriet,
On 2007-05-10, at 21:54, Gerriet M. Denkmann wrote:
So what I need is obviously something like: (void)
justBeforeTheNextDisplayScrollRangeToVisible:(NSRange)aRange
Is there something like this? Or what can be used instead?
You could make a subclass of NSTextView with your method (or just
override -scrollRangeToVisible:). When it's called, you'd save the
range in an ivar and call [self setNeedsDisplay:YES]. Then when -
drawRect: is next called, check if you have a range set and, if so,
call [super scrollRangeToVisible:] and return. Or something like that.
Instead of overriding -drawRect:, you could listen for
NSWindowDidUpdateNotification and do the scrolling then.
Jonathon Mah
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden