5

I am using winforms with C# and looking at the TableLayoutPanel

Is it possible to have a scroll bar on a large table, but not to have the top row scroll? It would be similar to how the "freeze panes" option works in Excel.

I only want to freeze the top row and nothing else. Also, my table is large enough that I will have a horizontal scroll bar as well. So when I scroll horizontally, I need both the top row and the rest of the rows to move at the same time and the same rate.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Gevo12321
  • 549
  • 1
  • 5
  • 19
  • 1
    can you not just set the `AutoScroll` property of the TableLayoutPanel to true? – ravenx30 Sep 03 '15 at 16:12
  • 1
    @ravenx30 That would make the whole table scroll. I want the top row to remain static while everything else scrolls – Gevo12321 Sep 03 '15 at 21:46
  • 3
    TLP has no such feature. Just put the controls that need to stay put on top of the TLP. And never, never make the mistake of assuming that TLP is a suitable way of implementing a grid control. DataGridView already does what you want, lots and lots of grid controls out there. – Hans Passant Sep 04 '15 at 07:36
  • @HansPassant thx, didn't know about DGV – Gevo12321 Sep 04 '15 at 08:11

0 Answers0