How to disable horizontal scrollbar for table panel in winforms
问题 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? 回答1: int vertScrollWidth = SystemInformation.VerticalScrollBarWidth; tableLayoutPanel1.Padding = new Padding(0, 0, vertScrollWidth, 0); 回答2: Lost a few hairs on this today, but I