Skip navigation.
 
mlRe: NSTextView without word wrap?
FROM : David Carlisle
DATE : Fri May 23 22:55:20 2008

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];
}

On May 23, 2008, at 12:03 PM, Douglas Davidson wrote:

>
> On May 23, 2008, at 10:33 AM, David Carlisle wrote:
>

>> I've spent the last few hours trying to create an NSTextView 
>> without word wrap.  The BiScrollAspect.m file in the 
>> textSizingExample project file is no help at all.

>
> No help in that it doesn't do what you want, or no help in that you 
> can't get it working in your app, or no help in some other way?
>
> Douglas Davidson
>

Related mailsAuthorDate
mlNSTextView without word wrap? David Carlisle May 23, 19:33
mlRe: NSTextView without word wrap? Douglas Davidson May 23, 20:03
mlRe: NSTextView without word wrap? David Carlisle May 23, 20:15
mlRe: NSTextView without word wrap? David Carlisle May 23, 22:55
mlRe: NSTextView without word wrap? Douglas Davidson May 23, 23:01
mlRe: NSTextView without word wrap? Jonathan Dann May 24, 00:08
mlRe: NSTextView without word wrap? David Carlisle May 24, 03:35
mlRe: NSTextView without word wrap? Jonathan Dann May 24, 11:52