• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTextField or NSTextView for this job?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSTextField or NSTextView for this job?
      • From: Brent Stace <email@hidden>
  • Prev by Date: Re: multiple documents, single window
  • Next by Date: Find the 'Application Support' folder
  • Previous by thread: save image into bmp image file type
  • Next by thread: Re: NSTextField or NSTextView for this job?
  • Index(es):
    • Date
    • Thread