找回密码
 立即注册

QQ登录

只需一步,快速开始

wangtiequan

注册会员

6

主题

12

帖子

42

积分

注册会员

积分
42
wangtiequan
注册会员   /  发表于:2016-9-1 07:26  /   查看:2881  /  回复:3
如题

3 个回复

倒序浏览
gw0506
超级版主   /  发表于:2016-9-1 11:08:36
沙发
  1. private void scrollToTextPosition(int textPosition)
  2. {
  3.   Point newScrollLocation = textControl1.ScrollLocation;
  4.   if (textPosition & 1 <= textControl1.TextChars.Count)
  5.   {
  6.     newScrollLocation = new Point(0, textControl1.TextChars[textPosition + 1].Bounds.Y);
  7.   }
  8.   else
  9.   {
  10.     newScrollLocation = new Point(0, textControl1.Lines[textControl1.Lines.Count].TextBounds.Y);
  11.   }
  12.   textControl1.ScrollLocation = newScrollLocation;
  13. }
复制代码
回复 使用道具 举报
wangtiequan
注册会员   /  发表于:2016-9-1 16:55:15
板凳
搞定,谢谢
回复 使用道具 举报
gw0506
超级版主   /  发表于:2016-9-5 15:23:45
地板

不客气。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部