Cocoa: how to implement a custom NSView with an editable text area?
Posted
by Rinzwind
on Stack Overflow
See other posts from Stack Overflow
or by Rinzwind
Published on 2010-05-27T09:22:14Z
Indexed on
2010/05/27
13:51 UTC
Read the original article
Hit count: 275
What's the minimum implementation needed to make a custom NSView with an editable text area? I assume NSTextFieldCell can be used for this. I've succeeded in drawing the cell in the view (which is straightforward), but making it editable seems to require a more complicated coordination between the view and the cell. Is there sample code available somewhere?
Update. I should have made clear that my longer-term goal is to have many more editable text areas on the same view. AFAIU it is better to use cells in that case as they are more light-weight than full-blown views. My updated question is: What's the minimum implementation needed to make a custom NSView with an editable text area using an appropriate NSCell?
© Stack Overflow or respective owner