Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView/NSScrollView update problems



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.