Set a tab page on lload event of a form
- by tanu
i have a form with many tabs on it. I want to set a specific tab page to show on load of the form everytime i load the form
I used TabPageControl1.SelectedTab=MyTabPage;
but the value of selectedtab is null.
It is throwing an exception that reference not set to an object.
private void PreferencesForm_Load(object sender, EventArgs e)
{
this.cbxCustomDataType.DrawMode = DrawMode.OwnerDrawFixed;
this.cbxCustomDataType.DrawItem += new DrawItemEventHandler(cbxCustomDataType_DrawItem);
this.cbxColumnDataType.DrawMode = DrawMode.OwnerDrawFixed;
this.cbxColumnDataType.DrawItem += new DrawItemEventHandler(cbxColumnDataType_DrawItem);
GetProjectDetails();
this.preferencesTabControl.SelectedTab= tpCompareUpdate;
}