• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextView offset of text at top of view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >NSTextView offset of text at top of view (From: Steve Palmer <email@hidden>)
 >Re: NSTextView offset of text at top of view (From: Steve Palmer <email@hidden>)
 >Re: NSTextView offset of text at top of view (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: how do I detect a click in a tableView cell?
  • Next by Date: Re: how do I detect a click in a tableView cell?
  • Previous by thread: Re: NSTextView offset of text at top of view
  • Next by thread: Scale and convert image to JPEG using NSImage, NSImageRep, etc?
  • Index(es):
    • Date
    • Thread