OK, from the department βI never expected this to be the hard partβ: how to set NSTextField text on a Xamarin Mac?
NSTextView view = new NSTextView(new RectangleF(0, 500, 200, 40));
view.StringValue = "Foo";
not compiled (no "StringValue" method). Also not setStringValue ("Foo"). Also, there is no SetText method. There is an InsertText method, but it does not accept a C # string; he wants an NSObject (which makes me think that it is not intended for direct use).
Note that if I use NSTextField instead of NSTextView, I can assign StringValue just fine. But with NSTextField the same code does not work.
I have experience programming ObjC on iOS, but pretty much noob for Cocoa Mac and Xamarin Mac. Therefore, I am sure that I am missing some obvious answer, but my search engine did not find an answer (and the Xamarin forums do not work today). Any help would be greatly appreciated.
source
share