Re: setting NSScrollView content width to NSText width

2010-03-16 Thread Martin Hewitson
Hi Dave, I'm not sure I've understood exactly, but perhaps the following get's you going in the right direction: [textView setHorizontallyResizable:YES]; [[textView textContainer] setWidthTracksTextView:NO]; [textView setMaxSize:NSMakeSize(1, FLT_MAX)]; Best wishes,

setting NSScrollView content width to NSText width

2010-03-16 Thread David Alter
I dynamically create a NSScrollView and place and NSTextView inside of it. I want the width of the content view to expand with the text. Basically the same way the xCode editor works. The horizontal scroll bar adjusts as texts is added. The width of the content view is the width of the longest line