文本选取框 WinForms
我想在winforms中实现滚动功能。 我需要文本像字幕一样滚动,但从下到上。
我怎样才能做到这一点?
I want to implement scrolling functionality in winforms. I need text to scroll like a marquee, but from the bottom to the top.
How can I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想我知道你想做什么。 (使特定区域可滚动)
您可以这样做:
面板。
面板区域现在可以滚动。
如果您想让整个表单可滚动,请为表单设置 AutoScroll = true 。
I think I know what you want to do. (making a specific area scrollable)
You can do it this way:
the panel.
The panel area is now scrollable.
If you want to make the whole form scrollable then set AutoScroll = true for the form.
这个问题有点模糊,但我认为您想要做的是在表单上设置 AutoScroll=true ,并且将自动提供滚动。
The question is a bit vague, but I think what you want to do is set AutoScroll=true on your form and scrolling will be automatically provided.
关于您对 PK 答案的评论,您需要简单地编码到计时器或其他方法中,以更改标签/控件 Y(或顶部)值,并根据需要递减它。 一旦达到 -(control Height),更改为 (Form.Height)+(Control Height) 并继续递减。
In relation to your comment to PK's answer, you'd need to simply code into a timer, or other method, to change the labels/controls Y (Or Top) value, decrementing it as required. Once it reaches -(control Height), change to (Form.Height)+(Control Height) and continue decrementing.