Bolding a range in a mutable string
Bolding a range in a mutable string
- Subject: Bolding a range in a mutable string
- From: Tom Gray <email@hidden>
- Date: Tue, 23 Jul 2002 17:39:08 -0400
Thanks in Advance! (Seriously, I mean it.)
I am the newbie trying to write a terminal application. I have an
NSMutableString containing the text. What I want to do is to, and this seems
like it should be simple, change the font, underline, bolding, color of
individual characters (ranges) in that string.
My NSMutableString is displayed in an NSTextView.
I have seen some hints which indicate that I need to be using rich format
text. However, I have found NO documentation on this at all!
So, my question is, can I change the bolding, font, color, (ie the style of
display of a font) with a NSMutableString displayed in an NSTextView?
If so, how?
If I can't, how do I create an NSData rtfdData object and stick text into
it.
Also, I am the guy who asked how to turn of the hyphenation for my
NSTextView, which I still can't figure out how to do.
Sorry to ask such a new quy type of question, but my documentation (Help ->
Cocoa Help -> Text Handling ) for:
Character Attributes
Hypenation
are still reporting "Documentation Forthcoming".
I may have to be working with attributed strings for this. However, my
system is heavily dependent on the ability to append to the string (when I
get a new line or new form command) and mutable attributed strings do not
support appending. So, if I have to use attributed strings to be able to
change the style of individual characters then I am going to need to learn
how to add text to an attributed string.
--
Tom Gray
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.