RE: Buttons inside an NSTextView / NSTextStorage?
RE: Buttons inside an NSTextView / NSTextStorage?
- Subject: RE: Buttons inside an NSTextView / NSTextStorage?
- From: Keith Blount <email@hidden>
- Date: Tue, 25 Oct 2005 15:11:13 -0700 (PDT)
Hello,
I am currently trying to implement inline comments in
an NSTextView in a similar way to how LyX does it. I
would like an NSButton to appear inline in the text
wherever a note occurs. If the user clicks on the
button, the note will appear next to it. If the user
clicks on the button again, the text will disappear. I
can get the text to appear and disappear using the
usual text replacement methods and some custom text
attributes, but my problem is, how do I get an
NSButton to appear inside the text and react to
clicks? I am pretty sure that I need to use
NSTextAttachment and NSTextAttachmentCell, but upon
searching the net, the archives, the docs and
CocoaDev, it seems that there is not much out there on
how I would go about this (there are a *lot* of
questions out there in the ether, just no real answers
as far as I can find; the only stuff out there on
NSTextAttachments relate to inserting images, which is
a lot easier and involves none of the tough
subclassing/protocol stuff...).
Has anybody had any experience of this or have any
advice?
Many thanks in advance,
KB
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
_______________________________________________
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