How do I add my dialog controls to a new tab page?

Posted on 2006-06-04
Last Modified: 2010-04-16
I have a dialog box on which I have a number of controls. I have now decided to split it into tabbed pages. But how do I move those existing controls onto one of the tab pages?
Question by:groovyjon
    LVL 5

    Expert Comment

    You can convert it into a UserControl, so your UserControl will have all the controls you want on a TabPage.  Once you done that, you can just drop your custom UserControl onto the TabPage.  If you do it this way, in the future if you want to move it, you can just drop your custom UserControl else where.



    Author Comment

    Can you clarify what you mean? What are you referring to when you say convert "it" into a UserControl? The TabPage or the individual controls? And how do I actually make the conversion?
    LVL 5

    Accepted Solution

    Ok, Let say, you have 3 button, 3 TextBox, 1 ComboBox, and 2 CheckBox.  You want them all to appear as a group in your TabPage.  What you could do is to drop all the controls onto the Tabpage, but if you want to move them again,  you'll have to manually move each control one by one.  Ideally you would want to move them as a group.  If create a UserControl with all the stuff I described on it, you can just drop the UserControl onto the TabPage (or add it programmatically).  Make sure you set the Dock to Fill on the UserControl.



    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
    Article by: Ivo
    C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now