NSTextView/NSScrollView update problems
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