如何使文本框垂直滚动条停留在框的底部? [英] How can I get a Text Box Vertical Scroll Bar to stay at the bottom of the box?
本文介绍了如何使文本框垂直滚动条停留在框的底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使文本框垂直滚动条停留在框的底部?
How can I get a Text Box Vertical Scroll Bar to stay at the bottom of the box?
推荐答案
您需要在插入符号的最后文字.
试试:
You need to set your caret at the end of your text.
Try:
//move the caret to the end of the text
myTextBox.SelectionStart = myTextBox.TextLength;
//scroll to the caret
myTextBox.ScrollToCaret();
这篇关于如何使文本框垂直滚动条停留在框的底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文