On Oct 11, 2008, at 11:27 AM, James W. Walker wrote:
When using the NSString or NSAttributedString methods for drawing text in a box, such as -[NSAttributedString drawWithRect:options:], is there any way to make the lines of text horizontally centered?
Yes. Create a dictionary with a key of NSParagraphStyleAttributeName and a value of a NSParagraphStyle instance with your alignment and potentially other attributes. When creating an instance of NSAttributedString you can use that dictionary for its attributes.
Or, use the dictionary with NSString's drawInRect:withAttributes: or drawWithRect:options:attributes:
___________________________________________________________ Ricky A. Sharp mailto:[EMAIL PROTECTED] Instant Interactive(tm) http://www.instantinteractive.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]