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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to