使用案例敏感性复选框自定义nstextfinder
我希望在我的nstextview
中添加一个复选框,以供病例敏感搜索。我已经阅读了Apple文档,但是nstextView
,nsscrollview
和nstextfinder
最好将其描述为混淆。我正在使用performTextFinderAction:
通过查找操作。
有没有办法在查找栏中添加其他按钮或视图,还是我必须替换整个内容?仅添加一个选项似乎有点过分杀伤。
病例敏感性也通过粘贴板属性传递,尽管在阅读文档后,我仍然感到困惑文本视图实际检查属性的位置和何时。 nstextFinderClient
仅提供匹配的子字符串的范围和矩形。
https://developer.apple.com/documentation/appkit/nstextfindercaseinsensitivekey
I've紧随其后使用此示例创建我自己的文本查找器方法:
nstextfinder + nstextfinder + prograponmatemationmatematematematemation + programmatity在nstextview中更改nstextview
任何,任何 nstextfinder 文档仅使用其提供的基本查找栏覆盖,也从不触摸自定义或完全更换它。
任何帮助或指出更好的文档的帮助将不胜感激。
I'm looking to add a checkbox for case-sensitive searches in my NSTextView
. I've read through the Apple documentation, but the relationship between NSTextView
, NSScrollView
and NSTextFinder
is best described as obfuscated. I am using performTextFinderAction:
to pass the find actions.
Is there a way to add additional buttons or views to the find bar, or do I have to replace the whole thing? Seems a bit overkill for just adding a single option.
Case-sensitivity is also passed through a pasteboard attribute, although after reading through the documentation, I'm still confused where and when the text view actually checks for the attributes. NSTextFinderClient
only provides ranges and rects for the matched substrings.
https://developer.apple.com/documentation/appkit/nstextfindercaseinsensitivekey
I've followed creating my own text finder method using this example:
NSTextFinder + programmatically changing the text in NSTextView
However, any NSTextFinder
documentation only covers using the basic find bar it provides, and never touches the subject of customizing it or replacing it altogether.
Any help or pointing to better documentation would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论