Horizontal scrolling winforms listview

Does anyone know if it is possible to enable horizontal scrolling only as a list of windows (the viewmode is set to large icons). What I want to do is create a list whose height is sufficient to show only one line of icons, and I do not want to have multiple lines. Only one very long row that the user will have to scroll horizontally to get the badges out of range. If I create a scroll of a list, then it automatically makes a few lines and places in the vertical scroll bar, which I don't want.

Thanks in advance!

+6
c # listview scroll winforms
source share
2 answers

Set the Alignment property to Left (or ListViewAlignment.Left , if you do this in code).

+10
source share

Just set one of the column widths: -2. the scroll bar appears:

 public Form1() {Listview1.Columns.Add("Name", 100, HorizontalAlignment.Center); Listview1.Columns.Add("Item Name", -2, HorizontalAlignment.Center); Listview1.Columns.Add("Item Link", 300, HorizontalAlignment.Center); } 

When setting one or more columns up to -2 wide, a scrollbar appears, I don’t know why actually, but I had this problem because I fixed the width by creating an event that disables the width change.

0
source share

All Articles