Re: NSTextView without word wrap?
Re: NSTextView without word wrap?
- Subject: Re: NSTextView without word wrap?
- From: Douglas Davidson <email@hidden>
- Date: Fri, 23 May 2008 14:01:49 -0700
On May 23, 2008, at 1:55 PM, David Carlisle wrote:
I made some guesses at which statements to copy from
BiScrollAspect.m and came up with the following awakeFromNib. I'm
not sure which statements are the most relevant, and why, but it
seems to do what I need.
- (void) awakeFromNib {
const CGFloat LargeNumberForText = 1.0e7;
[[textView textContainer]
setContainerSize:NSMakeSize(LargeNumberForText, LargeNumberForText)];
[[textView textContainer] setWidthTracksTextView:NO];
[[textView textContainer] setHeightTracksTextView:NO];
[textView setAutoresizingMask:NSViewNotSizable];
[textView setMaxSize:NSMakeSize(LargeNumberForText,
LargeNumberForText)];
[textView setHorizontallyResizable:YES];
[textView setVerticallyResizable:YES];
}
Yes, that looks pretty much like what you want. If you take a look at
the setup in the various TextSizingExample cases, you should see that
there's a fair bit that's common between them--standard text view
settings--and some pieces that vary depending on how the views are
supposed to resize.
Douglas Davidson
_______________________________________________
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