Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created an windows form .NET application with several listboxes, dropdowns and textboxs.
I would like to add tab controls (Page1, Page2,,etc)
Is there a way to use the initial form as Page1?
Or do I need to re-create all controls in Page1, copy the code behind and delete original controls?
This for sure can be done but to labor-intensive.
any help is greatly appreciated
Posted
Updated 10-Jun-15 20:25pm
v2
Comments
ramyajaya 11-Jun-15 1:18am    
If the form you have createf d is a user control then you can directly add it in the tab page
gggustafson 11-Jun-15 8:48am    
In VS Designer, increase the size of the form so that it can contain the current Page 1 controls plus a TabControl. Increase the size of the TabControl so that it will be large enough to accept a number of the current controls. Select and drag and drop some of the existing controls onto the appropriate TabPage. If the TabControl does not have all the existing controls, then again increase the size of the TabControl and drag more existing controls onto the TabControl. Adjust the size of the TabControl when all of your controls are in it. All of you code behind will work as before.

1 solution

Many thanks gggustafson,
Worked great and safe lots of time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900