To add a tab page to an existing tab control you need the following :
TabControl tb1;
TabPage tabPage1 = new TabPage();
tabPage1.Text="Tab page1";
tb1.Controls.Add(tabPage1);
Hope this helps..
Regards,
Tasos
Marc Solé wrote:
> Hello to everybody.
>
> I have a little problem with a Custom Control that I have created. The thing
> is that in my control, when I click a button, it should create another
> object in the main form.
>
> My control is located in a TabPage, and I want that when the user clicks a
> button, a new tabPage is created, but by now, I don't know how to do that.
>
> Any ideas, suggestions, links are wellcomed.
>
> Many thanks,
>
> Marc
|