Finding bounding rect of substring inside a wrapped string
Finding bounding rect of substring inside a wrapped string
- Subject: Finding bounding rect of substring inside a wrapped string
- From: Dave DeLong <email@hidden>
- Date: Sat, 03 Jan 2009 12:33:39 -0700
Hi everyone,
The title basically says it. I have a string (not very long; less
than 150 characters) that is wrapped inside an NSTextField (a label).
I want to find the bounding rects of a couple substrings, so that I
can overlay them with an NSButton. I've been searching around, and
I've found a promising lead with NSLayoutManager's "-
boundingRectForGlyphRange:inTextContainer:", but I've never used an
NSTextContainer before and am not sure how they work.
Would this be the proper way to do it? How can I create an
NSTextContainer that contains a string?
Any pointers are greatly appreciated.
Thanks!
Dave DeLong
_______________________________________________
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