Re: Dynamic NSTextView resizing while keeping Y position constant?
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.