// WORKAROUND: Selected is never raised if the first tab is selected. (which is annoying if you want to initialize it) public void SelectTab(string tabPageName, bool forceSelection) { if (!forceSelection) { base.SelectTab(tabPageName); } else { if (!TabPages.ContainsKey(tabPageName)) { return; } TabPage targetTab = First(x => x.Name.Equals(tabPageName)); if (TabPages.IndexOfKey(tabPageName) == 0) { OnSelected(new TabControlEventArgs(targetTab, 0, TabControlAction.Selected)); } else { base.SelectTab(tabPageName); } } }
public void UnHighlightTabPage(string key) { int i = TabPages.IndexOfKey(key); if (i != -1) { UnHighlightTabPage(i); } }
public void HighlightTab(string key) { int i = TabPages.IndexOfKey(key); if (i >= 0) { HighlightTab(i); } }
public void SelectTab(string tabPageName) { var index = TabPages.IndexOfKey(tabPageName); if (index == -1) { return; } SelectTab(index); }
public void HighlightTabPage(string key) { int i = TabPages.IndexOfKey(key); HighlightTabPage(i); }