Thanks Eric.

It makes sense, I suppose, that NSTextView wouldn't have an built-in way to do this - it just acts as a 'sheet' of text over which you must create a viewport in the form of a scroll view.

Actually, I've _literally_ just bumped into the reference below, while writing this:
http://developer.apple.com/documentation/Cocoa/Conceptual/TextUILayer/Tasks/TextInScrollView.html
... previously I'd avoided trawling through the text system documentation - probably because I didn't think I was _really_ doing anything for which I wanted The Text System per se ;-)

I think I'm going to try programmatically popping the field editor into an scroll view configured per this note and adding this whole kit and caboodle to to my view hierarchy, rather than just the NSTextView. Hopefully all the resizing will work as I need that. Anyway, I'll report back...

-- lwe



On 4-Mar-09, at 6:59 AM, Eric Gorr wrote:

I have recently experienced some of these same issues.

You can check out the message:

http://lists.apple.com/archives/cocoa-dev/2009/Mar/msg00179.html

for what I was concerned with.

As best I can determine, a NSTextView relies upon a NSScrollView to handle it's scrolling behavior. Unfortunately, there does not appear to be any way to place a fieldEditor inside of a NSScrollView in order to provide this behavior - but I haven't had that confirmed by anyone.

What I ended up doing is creating a NSTextView inside of a NSScrollView on the fly and using that as my field editor.

Although, I suppose creating a NSTextField would have worked as well...I may try switching to that as it would be less code.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to