Re: Properly wrapping non-contiguous NSTextViews
Re: Properly wrapping non-contiguous NSTextViews
- Subject: Re: Properly wrapping non-contiguous NSTextViews
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 15 Aug 2011 11:56:34 -0600
On Aug 14, 2011, at 2:46 AM, Martin Wierschin wrote:
> You make it sound as if a single NSTextView is responsible for completely showing all the text in each NSTextStorage. In other words, that each of your NSLayoutManagers has exactly one NSTextContainer (and one NSTextView) associated with it. But from your code and described strategy, it sounds like you actually have multiple NSTextContainers (and NSTextViews) associated with each NSLayoutManager.
I have multiple text containers & views associated with one text storage & one layout manager. The Cocoa text system does support this for doing things like having one text view per page.
> I don't know the particulars of your situation or what might be triggering the cutoff display (are they just descenders?), but have you tried reducing the height of the NSTextContainer while keeping your NSTextView height the same? (You'll have to disable automatic resizing). That should make NSLayoutManager place/assign less lines of text to the view, while keeping the drawable view bounds the same.
I did, and what happens is the layout manager keeps the last line in the text container where it will not be drawn. It will not move the last line to the next container unless I resize the text container to be two pixels smaller than needed, which results in text getting partially cut off later in the document.
I'm hoping there is a way to force the layout manager to not cut off text horizontally… It does prevent this from happening vertically through word wrapping.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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