Re: Placing an image in the border of NSTextView
Re: Placing an image in the border of NSTextView
- Subject: Re: Placing an image in the border of NSTextView
- From: Martin Wierschin <email@hidden>
- Date: Wed, 24 Jun 2009 16:04:39 -0700
How can I place an image in the left border of an NSTextView,
without causing a move or shift of the text to the right?
May I suggest learning about the Cocoa text system?
There's nothing in there that will do what he wants. Any image one
adds via the Cocoa text system is going to be a character/inline
graphic, which has a size that displaces the surrounding text. That
said, that documentation will be a great help when trying to figure
out how to position an image.
It's better for Filip to search the list archives for displaying
ancillary things in a text view, like line numbers in the gutter.
Depending on what you're doing exactly, you may want to subclass
NSTextView to do your additional drawing.
~Martin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden