C# ListView 垂直滚动
我一直在我的项目中使用 Winform ListView。当列表视图(列表中排列的项目)超出窗口空间时,它会在右侧启动一个新列表并创建一个水平滚动条,我需要它来进行下面的列表并且滚动条是垂直的。我已经设法使用类似的堆栈溢出问题的建议来做到这一点,但它创建了我不想要的列,除非有办法隐藏它?谢谢。
I have been using a Winform ListView in my project. When the list view (items arranged in list) exceeds the window space it starts a new list on the right and creates a horizontal scroll bar, I need it to carry on the list below and the scroll bar to be vertical. I have mananged to do this using the suggestions from a similar Stack Overflow question but it creates columns, which I don't want, unless there is a way to hide this? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
SmallIcon 视图可能更适合您,因为它看起来非常像 List,而不是垂直方向的项目。
The SmallIcon view might be more suitable to you since it looks pretty much like the List, instead of the items are oriented vertically.
我将从阅读这篇文章开始。
http://msdn.microsoft.com/en -us/library/system.windows.forms.listview.view.aspx
列表视图的行为方式相当不同,具体取决于
View
属性的设置。微软已经解释得相当清楚了。I'd start by reading this.
http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.view.aspx
The list view behaves in rather different ways depending on the setting of the
View
property. Microsoft have explained it fairly well.这是这个答案的派生,但做了一点改变
https://stackoverflow.com/a/2309205/22097795
如果任何人仍在寻找这个
宽度中的 100 是控件的宽度,因此如果它是动态的,您将需要更改它
This is a derivative of this answer, but changed a little
https://stackoverflow.com/a/2309205/22097795
If anyone is still looking for this
The 100 in the Width is the width of the Control so if that is dynamic you will need to change it