• 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
-usedRectForTextContainer: and attachments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-usedRectForTextContainer: and attachments


  • Subject: -usedRectForTextContainer: and attachments
  • From: Nick Zitzmann <email@hidden>
  • Date: Fri, 27 May 2011 13:20:01 -0600

Short version: How do I get -[NSLayoutManager usedRectForTextContainer:] to quit ignoring attachments?

Long version: I'm using -usedRectForTextContainer: to calculate the drawing height of a line of text that has already been laid out using -glyphRangeForTextContainer:. I've found that, when the last character is an attachment, and the width of the text container wraps the attachment on to a separate line from the rest of the text, then instead of -usedRectForTextContainer: returning a rect with enough height to display the text on one line and the attachment on another line, it just ignores the attachment, and returns a rect with only enough height to display the one line of text.

If I resize the text container so that the text before the attachment gets wrapped onto a second line, then -usedRectForTextContainer: returns the expected result, which makes me wonder if it's ignoring the attachment in the returned rect. I already tried changing the typesetter behavior, and that didn't resolve the problem. What can I do here, if anything?

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

  • Prev by Date: Re: Application Design
  • Next by Date: Re: TransformProcessType() still doesn't show menu (Bug ID# 5905139)
  • Previous by thread: Re: Application Design
  • Next by thread: Blue highlight on NSMenuItems stops appearing
  • Index(es):
    • Date
    • Thread