如何在ScintillaNet控件中将光标移动到特定行中的特定位置? [英] How to move the cursor to a specific position in a specific line in ScintillaNet control?

查看:592
本文介绍了如何在ScintillaNet控件中将光标移动到特定行中的特定位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过代码将光标移动到特定行的期望位置,任何可以使之起作用的想法都会受到赞赏.

I need to move the cursor to a desired position of a certain line by code, any ideas which could get that to work will be appreciated.

推荐答案

这是您要寻找的吗?

SCI_GOTOLINE(int行),此操作将删除所有选择,并将插入号设置在行号line的开头,并滚动视图(如果 使其可见.锚定位置与 当前位置.如果line在文档中的行之外(第一个 行是0),则行集是第一个或最后一个.

SCI_GOTOLINE(int line) This removes any selection and sets the caret at the start of line number line and scrolls the view (if needed) to make it visible. The anchor position is set the same as the current position. If line is outside the lines in the document (first line is 0), the line set is the first or last.

来自 http://www.scintilla.org/ScintillaDoc.html

这篇关于如何在ScintillaNet控件中将光标移动到特定行中的特定位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆