如何在FlowLayoutPanel中禁用水平滚动条? [英] How to disable horizontal scroll bar in FlowLayoutPanel?

查看:2327
本文介绍了如何在FlowLayoutPanel中禁用水平滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个FlowLayoutPanel的,有它的多个控件。我只希望在垂直方向上滚动。但是,当我设置自动滚屏= TRUE ,我得到了垂直和水平滚动条。我怎么可以禁用水平滚动条,并只保留垂直滚动条的工作?

I have a FlowLayoutPanel and there are multiple controls on it. I only want to scroll in vertical direction. But when I set AutoScroll = true, I got both Vertical and Horizontal Scroll bars. How could I disable the horizontal scroll bar and only keep the vertical scroll bar working?

推荐答案


  • 设置自动滚屏以真实

  • 设置的 WrapContents 以虚假的。

  • 确保尺寸更宽超过
    控件的宽度加上垂直滚动条的宽度。

  • Set AutoScroll to true
  • Set WrapContents to false.
  • Make sure the size is wider than the controls' width plus the width of a vertical scrollbar.
  • 水平滚动条将消失。如果没有,请提供一些更多的信息。

    The horizontal scrollbar should disappear. If it doesn't, please provide some more information.

    这篇关于如何在FlowLayoutPanel中禁用水平滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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