• 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
Re: problems with live resize of NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with live resize of NSTextView


  • Subject: Re: problems with live resize of NSTextView
  • From: Keary Suska <email@hidden>
  • Date: Sat, 25 Apr 2009 09:08:46 -0600


On Apr 24, 2009, at 3:06 PM, Stuart Malin wrote:

I have an NSTextView in a custom view, it is set to resize with the containing view only in the horizontal dimension. When I resize the window, the text view does resize, and it does re-layout its content to fit, both on expanding and shrinking. However, the text view not only changes its frame size height, but repositions itself (changing the y value of its frame's origin). Why does it do this?

You need to read the "Cocoa Drawing Guide" and "View Programming Guide for Cocoa". The answer is explicit: the 0,0 coordinate of the Cocoa drawing system is the bottom left.


More important to me: where is the best place for me to detect this change because I want to change the parent view's height to accommodate any increase in height in the text view.

One possible approach is to observe NSViewFrameDidChangeNotification coming from the view. See the NSView documentation for how to use it.


Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

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: problems with live resize of NSTextView
      • From: Stuart Malin <email@hidden>
References: 
 >problems with live resize of NSTextView (From: Stuart Malin <email@hidden>)

  • Prev by Date: Re: [NSOutlineView] _outlineCell and _trackingOutlineCell vs 64-bit
  • Next by Date: Re: [NSOutlineView] _outlineCell and _trackingOutlineCell vs 64-bit
  • Previous by thread: problems with live resize of NSTextView
  • Next by thread: Re: problems with live resize of NSTextView
  • Index(es):
    • Date
    • Thread