We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to dynamically create a scrollable Form and add it to a Tab

Thread ID:

Created:

Updated:

Platform:

Replies:

116874 Jun 24,2014 10:13 AM UTC Jun 25,2014 10:39 AM UTC Windows Forms 1
loading
Tags: TabControlAdv
Roberto Guerzoni
Asked On June 24, 2014 10:13 AM UTC

How to dynamically create a Form and add it to a Tab

 

Here is a code sample which demonstrates how you could dynamically create a Form and add that form to a new Tab.

          

[C#]

 

//Form2 is the dynamically created form in your project that needs to be added to a Tab.

//Create the form and set it’s TopLevel property to false to enable setting it’s parent.

Form2 frm2 = new Form2();

frm2.TopLevel = false;

//Create the new tab which will display Form2TabPageAdv newtab = new TabPageExt("FORM_2");

this.tabControlAdv1.Controls.Add(newtab);

//Set the parent of Form2 to be the new tab and display the form in the newly created tab.

frm2.Parent = newtab;

frm2.Visible = true;

frm2.Dock = DockStyle.Fill;


Senthil Kumaran Rajan [Syncfusion]
Replied On June 25, 2014 10:39 AM UTC

Hi Roberto,

Thanks for using Syncfusion product,

We would like to let you know that your query in "TabControlAdv" can be solved by changing the "AutoScroll" property to true.  Please have the below code snippet and attached sample.

Code Snippet [C#] : 
form2.AutoScroll = true;

Please let us know if you have any concern,

Regards,
R.Senthil kumaran

Attachment: forum_42ffb13b.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;