• 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
Laying out text in NSTextView around a subview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Laying out text in NSTextView around a subview


  • Subject: Laying out text in NSTextView around a subview
  • From: Jason Brennan <email@hidden>
  • Date: Thu, 25 Apr 2013 19:27:22 -0400

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.

Right now, I can easily add a subview to the textview but of course, that goes into the textview and the text is ignorant of the subviews, so it just runs over/under the subview. Not what I’d like, of course.

So I’d like to be able to add my own views at least in “block” (like when an HTML element is a block element, so it’s on its own line), and maybe “inline” as well (that is, a subview in line with the text, just like how an HTML element can be inline) although this is not absolutely required.

I can’t quite figure out how to make this work. The only way I’ve seen that things can be added to a textview are with Text Attachments, but those seem relegated to only images/files, and only in an NSCell, which doesn’t contain (to my knowledge) an arbitrary NSView.

I feel like this should be possible though, where do I start?


Thanks!
Jason Brennan
_______________________________________________

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


  • Follow-Ups:
    • Re: Laying out text in NSTextView around a subview
      • From: Seth Willits <email@hidden>
    • Re: Laying out text in NSTextView around a subview
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: ^Block statement considered harmful for callbacks?
  • Next by Date: Re: Find functions disabled while NSSearchField is first responder.
  • Previous by thread: Re: UITableViewCell with variable height
  • Next by thread: Re: Laying out text in NSTextView around a subview
  • Index(es):
    • Date
    • Thread