• 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
NSTextView resizeability and scrolling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView resizeability and scrolling


  • Subject: NSTextView resizeability and scrolling
  • From: Stamenkovic Florijan <email@hidden>
  • Date: Tue, 08 Sep 2009 13:50:44 -0400

Hi all,

I am trying to make a user interface in which there is a view that contains multiple subviews, one of which is an NSTextView. The parent view should be embedded in an NSScrollView. The idea is that when the NSTextView is typed in, and possibly resizes as a consequence, it's parent view should resize, scroll bars should appear etc.

The effect would be similar to what you get in address book when typing in the notes field. If the notes field gets too big, you get to scroll all of the contact info, not only the view. Googling indicates however that this is done differently, I am not searching for a way to imitate this exact behavior, just using it as an example of what I want to achieve visually.

I've googled for a solution, found nothing. I tried making it by observing the NSViewFrameChangedNotification of the NSTextView from it's parent, and resizing, but this is more tricky then I imagined.

As as side question, it seems that an NSTextView has some margins that separate the text from it's outer edges. This makes sense when the NSTextView is in an NSScrollView, but makes it difficult to align the text view when it is not. I can't find any documented API on controlling this. Is it possible?

Perhaps I am going about this the wrong way. I am open to suggestions on how to accomplish this some other way.

TIA,
F
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTextView resizeability and scrolling
      • From: Ross Carter <email@hidden>
  • Prev by Date: Re: NSImage with multiple representation sizes
  • Next by Date: Sheets positioning.
  • Previous by thread: [MEET] Chicago CocoaHeads Tuesday Sept. 8
  • Next by thread: Re: NSTextView resizeability and scrolling
  • Index(es):
    • Date
    • Thread