I'm trying to get something similar to below to work to hide or disable a textbox when a particular tab is active or selected. The following code doesn't seem to do anything:
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.tabControl1.SelectedIndex == 1)
{
textbox1.Visible = false;
}
}
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.tabControl1.SelectedIndex == 1)
{
textbox1.Visible = false;
}
}