Drawing custom text attributes
Drawing custom text attributes
- Subject: Drawing custom text attributes
- From: René Puls <email@hidden>
- Date: Sun, 21 Dec 2003 18:31:14 +0100
Hi,
does anyone have some quick examples how to use custom attributes with
the Cocoa text system? I know that I can just set arbitrary attributes
on an NSAttributedString, but where do I go if I want these attributes
to actually change the appearance of my text in an NSTextView?
For example, how would I implement an attribute similar to
NSUnderlineStyleAttributeName, but which draws a line *above* the text
instead of below? (Never mind if there is already such a thing, I just
want to know how it is done.)
I think that I need to subclass NSLayoutManager and override some of
the drawing methods; but they all look totally esoteric to me. A
simple-and-stupid example would be most welcome. :-)
Kind regards,
Reni Puls
_______________________________________________
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.