Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to add vertical scroll bars in tabcontrol/tabpages

Tags:

c#

winforms

I am designing an application in which i am using tab-control, and in one of the tab-page the information i want to display in bigger than the form size, the information is displayed in various text-boxes. i tried by adding following lines in designer code but it is still not working.

this.AutoScroll = true;
this.AutoScrollMargin = new System.Drawing.Size(20, 20);
this.AutoScrollMinSize = new System.Drawing.Size(this.Width, this.Height);

any help would be appreciated.

like image 499
Kratos Avatar asked Sep 13 '13 09:09

Kratos


1 Answers

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
like image 134
King King Avatar answered Oct 18 '22 11:10

King King