I’m having trouble with setting the visibility of a tab when a file is loaded in my application.
When a user launches the app it displays the welcome tab, what I’m trying to do is when a user selects file -> open it loads the file in a new editor form fine but I can’t seem to figure out how to make it load the form and also set the visibility of the editor tab.
if (this.openEditorDialog.ShowDialog(this) == DialogResult.OK && editForm != null)
{
editForm.Close();
editForm = new EditorForm(this);
editForm.OpenFile(this.openEditorDialog.FileName);
editForm.Closing += new CancelEventHandler(EditorForm_Closing);
editForm.Show();
}
I’ve tried doing editForm.EditorTab.Show(); as well as Activecontrol = editForm.EditorTab to no avail. Many thanks in advance.
The TabControl has a
SelectedTabproperty: check MSDN for that. I know I have a sample, just need to find it.…oops, it is
SelectTab: here on MSDN