Re: Updating NSTextView when it gets shorter [SOLVED]
Re: Updating NSTextView when it gets shorter [SOLVED]
- Subject: Re: Updating NSTextView when it gets shorter [SOLVED]
- From: Graham Cox <email@hidden>
- Date: Tue, 6 May 2008 02:04:37 +1000
Um, thanks for that. Does this qualify as *less* roundabout than one
notification? ;-)
G.
On 6 May 2008, at 12:44 am, Rob Petrovec wrote:
I override setMinSize to always set it to some small size (like
11x11) no matter what the passed in size is. I also override
setMaxSize to set whatever the passed in width is, but use my own
max size (10000, for example), and also set the textContainer to
match. Then override setString and textDidChange to I call the
super of each method and then call sizeToFit. Works like a charm.
Hope that helps...
--Rob
On Apr 30, 2008, at 4:48 AM, Graham Cox wrote:
Yep, it was something simple, though a bit roundabout:
I just made the hosting view receive the frameChanged notification
from the editor (after turning this on in the editor) then keeping
track of its previous frame and marking it for update.
If anyone knows a less roundabout way, please do tell!
G.
_______________________________________________
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