PDA

View Full Version : buttons/controls inside nstextview




MrFusion
Aug 9, 2006, 06:11 AM
Any pointers on how to embed a button inside a nstextview?

I am thinking about mail. If an email has an attachment, you can click the triangle to open the list with attachments.

Thanks



kpua
Aug 9, 2006, 08:40 AM
Have you tried just adding it with addSubview:?

NSTextView is just an NSView subclass, so you may be able to add subviews to it like any other class, including controls...

kainjow
Aug 9, 2006, 09:27 AM
I believe NSTextAttachment is what you want.