Skip to content

How to tab control programatically?

Henokh Setiabudi

Asked Jan 23, 2007, 8:25 AM EST1 answer
Share
LinkedInX
Hi, I'm Henokh Setiabudi form Indonesia. I have a little problem in project. I write program in C# windows application. I confuse on tab control use:? How to create tab control which accomodate same component ex.label and textbox programatically? (I want fill tabPage1 and next tabPage with same component)
Thanks for helping.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0

    Button myButton = new Button();
    myButton.Top = 100;
    myButton.Left = 100;

    TabControl1.TabPages[0].Controls.Add(myButton);


    You can change the tabpage index to add to different tab pages.
    I hope this help.

    0