Saturday, 14 September 2013

Can't seem to add button to another tabpage

Can't seem to add button to another tabpage

I have a TabControl with three TabPages. On tabPage2 there is one button.
I want to click on tabPage3 and see this button. I've searched around and
the code below is susposed to work but when I click on tabPage3 from
tabPage2, I don't see the button.
I must be missing something else?
Thanks for any help...
private void tabPage3_Click(object sender, EventArgs e)
{
this.tabPage3.Controls.Add(this.button1);
}

No comments:

Post a Comment