NSAttributedString drawing and NSText drawing
NSAttributedString drawing and NSText drawing
- Subject: NSAttributedString drawing and NSText drawing
- From: email@hidden
- Date: Mon, 29 May 2006 19:01:38 +0200
Dear List,
I have an application where I need to do in place editing of some
attributed text. I have attempted to use both an NSText as supplied
by the NSWindow (as a field editor) and my own instance of NSTextView
but with the same (odd?) result.
When I draw the text with drawAtPoint: method of NSAttributedString
it's spacing is marginally different from when the equivalent RTF is
drawn by the NSText or NSTextView. I can see no other way apart from
using RTF to transfer text between the NSTextView and the attributed
string. I have tried fiddling the line and paragraph spacing using
NSMutableParagraphStyle without success, since if I get the lines to
line up in one font, the line spacing is incorrect for another font.
Does anyone have any suggestions as to how one might handle this ?
How do the various apps that we see around handle this ? I have spent
many hours struggling with this and have achieved little.
Any suggestions would be appreciated.
Thanks in advance
Vincent
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden