how to add vertical scroll bars in tabcontrol/tabpages

Notice that "this" refer to whole class (your form).

Increase the value like this:

tab.AutoScrollMinSize = new System.Drawing.Size(1000,1000);

Or you can add panel1 to your tab, then dock it into the tab:

panel1.dock = dockingSyle.Fill;

Now you can make panel1 scrollable.


You have to set the AutoScroll on the TabPage, not the Form, you can do this at design time by selecting your tabpage first, then set the AutoScroll to true in the Properties window, or you can do by code like this:

 tabPage1.AutoScroll = true;
 //do the same for other tabPages

Tags:

C#

Winforms