在富文本框中设置上光标位置 [英] set upper cursor position in rich text box

查看:579
本文介绍了在富文本框中设置上光标位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一旦我到达光标框的右下角,它就会滚动到另一行;我想知道是否有办法阻止这种情况

,即一旦光标到达文本框的右下角,就不允许再输入任何数据

Once I get to the bottom right corner of the cursor box, it scrolls to another line; I would like to know if there is a way to stop this happening

ie once cursor reaches bottom right hand corner of text box, no further data entry is allowed

推荐答案

这非常简单.只需检查

RichTextbox1.Maxlength = 300

检查字体大小,在一页中可以显示多少个字符并设置MAXLENGTH属性.


对于您的标题:


RichTextBox1.SelectionStart = 0
RichTextBox1.SelectionLength = 0

It's very simple. Just check

RichTextbox1.Maxlength=300

Check accroding to your font size, how many characters can display in 1-page and set the MAXLENGTH property.


For Your Title:


RichTextBox1.SelectionStart = 0
RichTextBox1.SelectionLength = 0


这篇关于在富文本框中设置上光标位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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