ScintillaNet中的文本替换 [英] Text replacement in 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?
推荐答案
您可以使用控件属性ScintillaNET.Indentation(从GUI或以编程方式)执行此操作.
You can do this with the control property ScintillaNET.Indentation, from the GUI or programmatically.
设置IndentWidth = 4(四个空格),TabIndents = true和UseTabs = false.
每次按下Tab键都会缩进4个空格.
Set IndentWidth=4 (four spaces), TabIndents=true, and UseTabs=false.
This will indent 4 spaces ever time the Tab key is pressed.
这篇关于ScintillaNet中的文本替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!