• 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
Scroll an NSTextView to a new place
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scroll an NSTextView to a new place


  • Subject: Scroll an NSTextView to a new place
  • From: John Stiles <email@hidden>
  • Date: Tue, 19 Feb 2008 09:34:54 -0800

How do you change the scroll location of an NSTextView+NSScrollView programmatically?

I've got code which seems like it ought to work, but when I call it, it causes the text view's contents to vanish (the text view appears to have nothing in it). If I resize the text view, it fixes and shows the expected results, but this seems to indicate that I'm not doing something right.

What I've got now:

NSRect visibleRect = [myTextView visibleRect];
NSClipView* clipView = [myScrollView contentView];
[clipView scrollToPoint:NSMakePoint(visibleRect.origin.x, newVerticalPosition)];
[myScrollView reflectScrolledClipView:clipView];


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


  • Follow-Ups:
    • Re: Scroll an NSTextView to a new place
      • From: Daniel Jalkut <email@hidden>
  • Prev by Date: Re: Icons in Dockmenu
  • Next by Date: Re: Scroll an NSTextView to a new place
  • Previous by thread: Re: -saveDocument: and package problems
  • Next by thread: Re: Scroll an NSTextView to a new place
  • Index(es):
    • Date
    • Thread