格式化字符
我有一个应用程序(IM 客户端),我希望以类似于 mIRC 的方式设置自定义格式符号,而不是依赖于富文本。我将通过将 UniChar 003 与数字 0-15 配对来处理不同事物的颜色和其他字符来实现此目的。我遇到的唯一问题是,当插入这些字符时,它们是不可见的,因此最终用户很难在需要时删除它们。有没有办法以显示特定不可见字符的方块的方式操作 NSTextField ?
I have an application (IM Client) that I wish to setup custom formatting symbols in similar to mIRC rather than relying on rich text. I will accomplish this by pairing a UniChar 003 with a number 0-15 to process colors and other characters for different things. The only problem that I have is that when these characters are inserted they are invisible so it is difficult for the end user to thus delete them when needed. Is there a way to manipulate NSTextField in a way to show squares for specific invisible characters?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将它们替换为文本字段中的可见字符,并且当用户完成时将它们替换回来:
当用户完成时向后执行:
You could replace them whith a visible character in the Text field, and when the user is done replace them back:
when the user is done do it backwards: