NSTextField or NSTextView for this job?
NSTextField or NSTextView for this job?
- Subject: NSTextField or NSTextView for this job?
- From: Jerry Krinock <email@hidden>
- Date: Sat, 09 Oct 2004 07:16:26 -0700
I want my users to view of text which will never wrap lines but show
horizontal and/or vertical scrollbars to appear as needed.
I'm playing with two possible solutions:
1. NSTextView in an NSScrollView. From searching the archives
www.cocoabuilder.com, I see many methods but they all look complicated and
kludgy, so I thought of this:
2. NSTextField in an NSScrollView. This would work if I resized the
NSTextField frame to just fit the text. Scrollbars automatically appear
whenever the NSTextView is too big for the NSScrollView. But I need a way
to compute the size of the required frame. I remember in the old days of
"Inside Macintosh" there were functions for "measuring" displayed text. Is
there anything like that in Cocoa?
Which way should I go with this?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden