如何滚动到多行文本框的底部? [英] How to scroll to bottom of a multi-line TextBox?

查看:111
本文介绍了如何滚动到多行文本框的底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有,我有一个多行文本框Web控件。我使用的是timer_tick事件更新文本框的内容。我想每次timer_tick事件被触发时,显示文本框的最后一行。有人能帮我吗?

I have a web control in which I have a multiple line text box. I'm updating the contents of the text box using a timer_tick event. I want to display the last line of the text box every time the timer_tick event is fired. Can some one help me?

推荐答案

我觉得OP一直在寻找滚动文本框在每次更新底部。
我发现这帮助了我。

I think the OP was looking for scrolling the text box to the bottom on every update. I found this which helped me.

Textbox1.SelectionStart = Textbox1.Text.Length - 1  
Textbox1.ScrollToCaret()  

这篇关于如何滚动到多行文本框的底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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