• 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
NSTextView/NSScrollView update problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView/NSScrollView update problems


  • Subject: NSTextView/NSScrollView update problems
  • From: <email@hidden>
  • Date: Thu, 15 Nov 2007 12:40:41 +1100
  • Sensitivity: Normal

Hi

I'm trying to manually recreate the default automatic behaviour of NSTextView (wrapping text, infinite page length, etc).  The problem I'm having is when, as the text view fills up with text, the text extends past the bottom of the view and it becomes time for the encompassing NSScrollView to update the scroll position.  It succeeds to a point and then stops.  I can correct the NSScrollView's view of things by resizing the window to make the text visible and then shrinking the window again.

The various settings I have are as follows:

NSSize containerSize = NSMakeSize(0, 1000000000);
textContainer = [[NSTextContainer alloc] initWithContainerSize:containerSize];
[textContainer setWidthTracksTextView:YES];
...
[scrollView setHasVerticalScroller:YES];
[scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
...
[textView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[textView setVerticallyResizable:YES];

I've also tried setting the 'textView' autoresizing mask to just NSViewWidthSizable but it doesn't fix the problem.  Any help that can be offered would be greatly appreciated.

Regards,

David Schweinsberg

_______________________________________________

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

  • Prev by Date: Re: How to get absolute x?
  • Next by Date: NSTextView scroll is really slow!! How do I achieve fast scrolling like Terminal App?
  • Previous by thread: Re: How to get absolute x?
  • Next by thread: NSTextView scroll is really slow!! How do I achieve fast scrolling like Terminal App?
  • Index(es):
    • Date
    • Thread