如何在 Scintilla 中自动滚动?
我有一个使用 Scintilla 的简单 VB.NET 应用程序。我不知道如何使控件在添加文本时自动滚动。
有人可以帮忙吗?
谢谢
I have a simple VB.NET application using Scintilla. I don`t know how can I make the control auto scroll when text is added to it.
Can anyone help?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
完毕。
Scintilla 可以通过调用自动滚动:
Scintilla1.Scrolling.ScrollBy(0, Scintilla1.Lines.Count)
因此它滚动到最后一个文本行。
Done.
Scintilla can auto-scroll by calling:
Scintilla1.Scrolling.ScrollBy(0, Scintilla1.Lines.Count)
so it scrolls to the last text line.
当尝试使 ScintillaNET 编辑器控件在更新 Text 属性后滚动到底行时,接受的解决方案对我不起作用。也许是因为我将它嵌入到 WPF WindowsFormsHost 中。无论如何,这里是我用来使 ScintillaNET 编辑器控件在我的上下文中自动滚动的代码。 (注意,代码是用C#编写的):
The accepted solution didn't work for me when trying to make a ScintillaNET editor control scroll to the bottom line after updating the Text property. Perhaps it's because I am embedding it in a WPF WindowsFormsHost. In any event, here is the code I used to make the ScintillaNET editor control auto-scroll in my context. (Note, the code is in C#):