Re: NSTextView/NSTextField Question
Re: NSTextView/NSTextField Question
- Subject: Re: NSTextView/NSTextField Question
- From: Douglas Davidson <email@hidden>
- Date: Thu, 3 Jan 2002 11:30:19 -0800
On Thursday, January 3, 2002, at 11:01 AM, Mike Brinkman wrote:
Ideally, I'd like to use NSTextView for this field, but I can't find a
method for getting a string value from an NSTextView. Does such a method
exist? If not, does anybody know a way I can add a scroll bar into an
NSTextField? I've checked the foundation & app kit docs, but can't find
anything.
Don't forget the superclass...NSTextView is a subclass of NSText, which
has a -string method. This is a convenience method; the full contents
of the text view are contained in its NSTextStorage, which is a subclass
of NSMutableAttributedString, and can be used for more detailed
inquiries.
You can add a scroll bar to just about any view by putting it in a
scroll view (in IB, you may need to use a "group in scroll view" menu
item).
Douglas Davidson