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?
I have experienced this problem.
A lot of people also get same problem in Datagrid. But, there is no exact solution for this question you will have to manually decide the the dimension of the panel according to use.
this will disable the horizontal scroll bar but you will have to manually adjust the dimension of the table layout panel.
Another way could be calculating the possible width of tablelayoutpanel during run time and if it greater than the value you have set then you can enable it.