How to set font in NSTextView?

As simple as it seems, I simply CANNOT find ANY way to do that (setFont: is not working) :

  • Have a NSTextView
  • Set its font to some NSFont.

Hint : (Pretty obvious, but whatever... ) IF the user adds any text, the new text is supposed to 'inherit' the exact same style...

Answers


I don't know what you're doing wrong, I am able to change the NSTextView's font in my own project. Are you sure you're setting the font AFTER the text view has been loaded? Check if the text view is loaded using NSLog.


Need Your Help

Rollback first of two transactions

postgresql transactions rollback

Is it possible to make third step in PostgreSQL?

How to multiply two sparse matrix using cuSparse?

cuda gpu sparse-matrix

cuSparse only has a function api for multiplying a sparse matrix with a dense matrix. How to do multiply operation for two sparse matrices using cuSparse or any other cuda liberary?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.