TabControls and dynamic tabs

I have an application that will dynamically add a tabbed page when the user clicks on certain objects in the application. I am successful at adding the tab but I cannot figure out how to call or access the new tabpage. the IDE does not seem to "intelli-type" it. I assume that this is because I dynamically created it. so how can I access and change the properties on the new tabpage

Thanks for any assistance.



Answer this question

TabControls and dynamic tabs

  • Asian Dragon

    like any other control

    you creat a tabpage and give it a name so you use it in your code like

    TabPage tabPage10= new TabPage();

    //like mynewpage.property = value;

    this.tabPage1.Name = "tabPage10";

    this.tabControl1.Controls.Add(this.tabPage10);

    hope this helps



  • Qasrawi

    From there how do I access the properites of a specific tab. I need to be able to access them individually.
  • Richard Weir

    tabs.TabPages will allow you to access all the tab pages.



  • TabControls and dynamic tabs