How to disable horizontal scrollbar for table panel in winforms

c#, scrollbar, tablelayout, winforms

Solution

int vertScrollWidth = SystemInformation.VerticalScrollBarWidth;

tableLayoutPanel1.Padding = new Padding(0, 0, vertScrollWidth, 0);

Problem

Hi I've a tablelayoutpanel and I'm binding controls to it dynamically. When the item count exceeds the height of panel obviously vertical scroll bar appearing there is no problem. But the same time horizontal scroll bar is also appearing even the items width is less than the width of panel. How can i prevent this?

Original source