I have a Windows Forms ListView in a form (C#, VS 2005) and have it anchored to all the edges of the form so that it entirely fills the form excluding the status bar. The ListView is in detail mode and the columns are very wide - definitely wider than the display area. I have a vertical scrollbar but no horizontal scrollbar.
I can scroll to the left and right with the keyboard when the control has the focus, but I cannot get the scrollbar to display.
Scrollable is set to true.
What am I missing?
It looks like the status bar is hiding the horizontal scroll bar, besides than changing the Dock property to Fill, you can check whether:
- Add a SplitContainer and arrange the Controls inside of them
- Modify your Status Bar's Dock to bottom
- Add a FlowLayoutPanel and put your Controls inside of it.
Hope these tips be useful
Rather than anchoring it to all four sides to fill the area, try setting the Dock
property to Fill
.
If Scrollable
was set to false
, you wouldn't be able to scroll with the keyboard, so the status bar must be hiding the scrollbar from you.
What you can do it set the listview's dock to Fill
or shrink the listview a little to not go under the status bar.
Had the same problem with the status bar hiding the horizontal scroll bar of an ImageBox (emgu)
seem that the order of placing the GUI elements is important here.
place the ListView / ImageBox after you place the status bar and it will work like a charm.