I am using a System.Windows.Forms.ListView with checkboxes = true I can see that when the list items are more than what can fit ,i get a horizontal scroll bar.I tried to find any Properties to change scroll bar orientation.Is there any way to make it scroll in vertical direction?Thanks in advance
The ListView should also display a vertical scrollbar automatically if you've got enough items in the collection (i.e. more than can be displayed on the ListView currently).
You can't change the scroll bar orientation, per sé.
You get a vertical scrollbar if you have items that go off the bottom of the listview, and a horizontal scrollbar if you have items that go off the right-hand side of the listview.
So if you want to control the scrollbars, you actually do this by controlling the content. Personally I only ever use ListViews in Detail mode, but to take that as an example, you would make sure that your column headers are sized such that they all fit in the horizontal space.
You need to Set
Listview1.Scrollable = true;
Listview1.View = View.Details
This will only work correctly if you have added some columns in your Listview1, So add a dummy column. like,
ColumnHeader header = new ColumnHeader();
header.Text = "";
header.Name = "col1";
listView1.Columns.Add(header);