macos - 禁用 NSTextView 中的编辑

标签 macos cocoa nstextview

我试图在 NSTextView 中禁用编辑,但那里似乎没有任何选项。所有其他类型都启用了属性,当设置为 false 时,该属性不可编辑,但 NSTextView 是否有任何选项?

最佳答案

请不要忘记类继承其父类(super class)的方法。 NSTextView 的父类(super class)是 NSText。在那里你可以找到方法

  • (void)setEditable:(BOOL)标志

带有评论:

Controls whether the receiver allows the user to edit its text.

关于macos - 禁用 NSTextView 中的编辑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29389816/

相关文章:

c++ - 如何在 OSX 中安装 boost

objective-c - 设置值 :forUndefinedKey: this class is not key value coding-compliant for the key

cocoa - NSScrollView 中 NSView 顶部的填充

swift - 无法从场景编辑器引用 SKSpriteNode 到代码

c++ - @class 和#imports 之间的区别

cocoa - NSTextView 中的自定义绘图选择

objective-c - 如何将所有属性内容从 NSTextView 复制到 NSPasteboard

swift - NSTextView 示例中带有 NSTextList 的项目符号列表?

macos - Mac OS中的〜\.vim文件夹在哪里?以及如何在gvim中安装主题?

macos - Core Data + Cloudkit 在开发中有效,但在分发后在生产中不起作用