Re: Laying out text in NSTextView around a subview
Re: Laying out text in NSTextView around a subview
- Subject: Re: Laying out text in NSTextView around a subview
- From: Seth Willits <email@hidden>
- Date: Mon, 29 Apr 2013 12:01:27 -0700
On Apr 29, 2013, at 11:08 AM, Seth Willits wrote:
>> What I’m trying to do is have an NSTextView and add custom NSView subviews to it, but have it so the text can layout around the subviews.
>
> You need a custom text container. See http://developer.apple.com/library/mac/#samplecode/TextLayoutDemo/Introduction/Intro.html
I re-read this.
Do you want something like Xcode's inline errors (when the error bubble is under the line of code with the problem)? The text flows around it, but you also want that bubble to move with a particular bit of text?
You'll still need a custom text container to manage text flow around the block, but I think you'll probably want to combine that with a text attachment which gives you the location in-text of that block and a storage mechanism. The text attachment is not critical, but would be useful since the character location of that block would automatically move when the text storage is edited.
--
Seth Willits
_______________________________________________
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