文本选取框 WinForms

发布于 2024-08-01 16:15:42 字数 70 浏览 2 评论 0原文

我想在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

平安喜乐 2024-08-08 16:15:42

我想我知道你想做什么。 (使特定区域可滚动)
您可以这样做:

  • 创建一个表单
  • 将一个面板拖到其上。
  • 设置面板对接...按照您想要的方式
  • 为面板设置 AutoScroll = true(Eric 建议这样做)。
  • 现在将任何其他控件拖到
    面板。

面板区域现在可以滚动。

如果您想让整个表单可滚动,请为表单设置 AutoScroll = true 。

I think I know what you want to do. (making a specific area scrollable)
You can do it this way:

  • Create a form
  • Drag a panel onto it.
  • Set the panel docking...the way you want it
  • Set AutoScroll = true for the panel(Eric has suggested this).
  • Now drag any other control onto the
    the panel.

The panel area is now scrollable.

If you want to make the whole form scrollable then set AutoScroll = true for the form.

凉风有信 2024-08-08 16:15:42

这个问题有点模糊,但我认为您想要做的是在表单上设置 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.

情痴 2024-08-08 16:15:42

关于您对 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文