ScintillaNet 中的文本替换
我有一个 ScintillaNet 文本编辑控件。当用户在控件中键入内容时,我想用 4 x 空格替换制表符。我不太确定在哪里执行此操作,因为我对控件不太熟悉。我一直在调查所有事件,但似乎没有什么合适的。有人可以建议吗?
I have a ScintillaNet text editing control. I want to replace tabs with 4 x space as the user is typing in the control. I'm not exactly sure where to do this as I'm not very familiar with the control. I have been looking into all the events but nothing seems fit. Can someone advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过 GUI 或以编程方式使用控件属性 ScintillaNET.Indentation 来完成此操作。
设置 IndentWidth=4(四个空格)、TabIndents=true 和 UseTabs=false。
每次按下 Tab 键都会缩进 4 个空格。
You can do this with the control property ScintillaNET.Indentation, from the GUI or programmatically.
Set IndentWidth=4 (four spaces), TabIndents=true, and UseTabs=false.
This will indent 4 spaces ever time the Tab key is pressed.