help in tab control
-
Hello, I have many tab pages in my tabcontrol. The tabpages are shown in one line. How can i do so the tabpages will be in 2 lines (for example 5 in the upper and 5 in the lower etc)?
-
Hello, I have many tab pages in my tabcontrol. The tabpages are shown in one line. How can i do so the tabpages will be in 2 lines (for example 5 in the upper and 5 in the lower etc)?
Have a look at this:
private void Form1\_Load(object sender, EventArgs e) { TabControl tabControl1 = new TabControl(); TabPage tabPage1 = new TabPage(); TabPage tabPage2 = new TabPage(); TabPage tabPage3 = new TabPage(); TabPage tabPage4 = new TabPage(); TabPage tabPage5 = new TabPage(); Label label1 = new Label(); // Allows multiple rows of tabs in the tabControl1 tab strip. tabControl1.Multiline = true; tabControl1.SizeMode = TabSizeMode.FillToRight; tabControl1.Padding = new Point(15, 5); tabControl1.Controls.AddRange(new Control\[\] { tabPage1, tabPage2, tabPage3, tabPage4, tabPage5}); tabControl1.Location = new Point(35, 65); tabControl1.Size = new Size(220, 180); // Gets the number of rows currently in the tabControl1 tab strip. // Assigns int value to the rows variable. int rows = tabControl1.RowCount; label1.Text = "There are " + rows.ToString() + " rows of tabs in the tabControl1 tab strip."; label1.Location = new Point(35, 25); label1.Size = new Size(220, 30); Size = new Size(300, 300); Controls.AddRange(new Control\[\] { label1, tabControl1 }); }
zafer
-
Hello, I have many tab pages in my tabcontrol. The tabpages are shown in one line. How can i do so the tabpages will be in 2 lines (for example 5 in the upper and 5 in the lower etc)?
You could try Google[^] You could try reading the documentation[^] You could try reading the "how to get an answer to your question" at the top of the page. All of these are quicker than "post and pray"
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones