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: Steve Palmer <email@hidden>
- Date: Sun, 21 Mar 2004 18:37:42 -0800
Ah. You're right.
Thanks!
On Mar 21, 2004, at 5:34 PM, Allan Odgaard wrote:
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.