How to add Text to a NSTextView?

209 Views Asked by At

I am working on a project and I need to add text to an NSTextView object. I have seen other posts that say I need to use the "Value" parameter but when I try that it errors out. here's the code to show what I mean.

TextView.Value = "String Value";

I am using Visual Studio and XCode to develop, and I'm using a Cocoa app template. Thank you for any and all help!

1

There are 1 best solutions below

1
Exildur On

To add text to an NSTextView object in a Cocoa app, you should use the string property, like so:

TextView.string = "String Value"