views:

2005

answers:

3

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?

A: 

Rather than anchoring it to all four sides to fill the area, try setting the Dock property to Fill.

Adam Robinson
+1  A: 

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

Jhonny D. Cano -Leftware-
That's what was happening - I just solved it in code, I couldn't get any of the suggestions to handle it automatically - lvw.Height = sstrip.Top ;
Cade Roux
+1  A: 

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.

Samuel
That's what was happening - I just solved it in code, I couldn't get any of the suggestions to handle it automatically - lvw.Height = sstrip.Top ;
Cade Roux