how to insert a NSAttributedString into a NSTextview ?
how to insert a NSAttributedString into a NSTextview ?
- Subject: how to insert a NSAttributedString into a NSTextview ?
- From: Jérémie Banier <email@hidden>
- Date: Sat, 25 Dec 2004 21:22:24 +0100
Hello,
I'm pretty new to cocoa and I would like to know how you can insert an Attributed string into a NSTextView ...
I was expecting the following to do some things but I does not do much ...
NSMutableString* s = [ NSMutableString stringWithFormat: @"0xlx:", fh?foff:(unsigned long)p ];
foff += sizeof(ppc_word);
tempString = [tempString initWithString: s ];
[ tempString addAttribute: NSForegroundColorAttributeName
value: [NSColor blueColor]
range: NSMakeRange(0, [ s length ])];
[ myRTFTxt replaceCharactersInRange: NSMakeRange(0, [ [ myRTFTxt string ] length ])
withString: tempString ];
I would appreciate any comments, pointer, samples ...
Many thanks,
Jéré.
_______________________________________________
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