ScintillaNet 中的文本替换

发布于 2024-10-06 16:20:56 字数 116 浏览 0 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

把回忆走一遍 2024-10-13 16:20:56

您可以通过 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文