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

Re: Dynamic NSTextView resizing while keeping Y position constant?


  • Subject: Re: Dynamic NSTextView resizing while keeping Y position constant?
  • From: Izidor Jerebic <email@hidden>
  • Date: Sat, 19 Jun 2004 18:48:24 +0200

On 18 Jun 2004, at 20:13, Nick Zitzmann wrote:

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.


Well, I did it with frame change notifications:
1. Enable frame change notifications for NSTextView object
2. Subclass NSTextView to keep old frame (or keep old frame somewhere else)
3. When frame change notification arrives, set the frame origin of NSTextView to old origin (set the flag to prevent infinite loop with this, because setting the origin will also fire frame change notification)

If somebody has come up with simpler approach, I too would like to know...

Regards,
izidor
_______________________________________________
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: Mike Ferris <email@hidden>
References: 
 >Dynamic NSTextView resizing while keeping Y position constant? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Obj-C runtime not thread-safe?!
  • Next by Date: drop location
  • Previous by thread: Dynamic NSTextView resizing while keeping Y position constant?
  • Next by thread: Re: Dynamic NSTextView resizing while keeping Y position constant?
  • Index(es):
    • Date
    • Thread