Re: NSTextView offset of text at top of view
Re: NSTextView offset of text at top of view
- Subject: Re: NSTextView offset of text at top of view
- From: Allan Odgaard <email@hidden>
- Date: Mon, 22 Mar 2004 02:34:32 +0100
On 22. Mar 2004, at 2:00, Steve Palmer wrote:
Unfortunately that doesn't work:
[textView pageDown:self];
NSRect bounds = [textView bounds];
NSRect visible = [textView visibleRect];
NSLog(@"Bounds = %d,%d, Visible = %d,%d", bounds.origin.x,
bounds.origin.y, visible.origin.x, visible.origin.y);
I get (0,0) for both bounds and visibleRect on some long text which has
already scrolled. [...]
It works (just verified it), but pageDown: will probably use
scrollRectToVisible: which is not reacted upon immediately, which is
why the code above does not show a change in the visible rectangle.
** Cocoa FAQ: <
http://www.alastairs-place.net/cocoa/faq.txt> **
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.