• 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
Dynamic NSTextView resizing while keeping Y position constant?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dynamic NSTextView resizing while keeping Y position constant?


  • Subject: Dynamic NSTextView resizing while keeping Y position constant?
  • From: Nick Zitzmann <email@hidden>
  • Date: Fri, 18 Jun 2004 12:13:37 -0600

I've searched the archives and didn't come up with anything that satisfied what I want to do...

I'm trying to make an NSTextView that automatically resizes itself vertically when the user fills it with text to display. But I want it to grow in height and not change its Y position. The text view is not inside a scroll view.

If I call -setVerticallyResizable: with YES in the text view, then when the text view is filled, it increases its size, but it also decreases its Y position in the superview, which makes it look like it's going off-screen.

I've been pointed to the -layoutManager:didCompleteLayoutForTextContainer:atEnd: NSLayoutManager delegate method, but I'm not sure about what to look for in this method. The boolean from the atEnd: is always YES.

So how can I accomplish this? Does anyone know?

Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Dynamic NSTextView resizing while keeping Y position constant?
      • From: Izidor Jerebic <email@hidden>
  • Prev by Date: Re: many-to-many relationships and object design
  • Next by Date: Re: Scrolling List of Thumbnails?
  • Previous by thread: Re: [NSWindow invalidateShadow] dosen't works?
  • Next by thread: Re: Dynamic NSTextView resizing while keeping Y position constant?
  • Index(es):
    • Date
    • Thread