Reputation: 31221
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.
Upvotes: 6
Views: 18042
Reputation: 1
This is a derivative of this answer, but changed a little
https://stackoverflow.com/a/2309205/22097795
If anyone is still looking for this
ListView1.View = View.Details;
ColumnHeader header = new ColumnHeader();
header.Text = "";
header.Name = "dummy";
header.Width = 100;
ListView1.Columns.Add(header);
ListView1.HeaderStyle = ColumnHeaderStyle.None;
The 100 in the Width is the width of the Control so if that is dynamic you will need to change it
Upvotes: 0
Reputation: 3303
The SmallIcon view might be more suitable to you since it looks pretty much like the List, instead of the items are oriented vertically.
Upvotes: 7
Reputation: 35716
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.
Upvotes: 4