private void krbTabControl1_SelectedIndexChanging(object sender, KRBTabControl.KRBTabControl.SelectedIndexChangingEventArgs e) { if (e.TabPage.Text == "IsSelectable?") { e.Cancel = true; } }
private void krbTabControl1_TabPageClosing(object sender, KRBTabControl.KRBTabControl.SelectedIndexChangingEventArgs e) { if (e.TabPage.Text == "Schedules") { if (MessageBox.Show("Do you want to remove the Schedules tab page?", Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) { e.Cancel = true; } } }
private void tabcontrl_SelectedIndexChanging(object sender, KRBTabControl.KRBTabControl.SelectedIndexChangingEventArgs e) { try { if (e.TabPageIndex == tabcontrl.TabPages.Count - 1) { PeriodOverviewCtrl ctrl = overviewTabPage.Controls[0] as PeriodOverviewCtrl; if (ctrl == null) { return; } ctrl.RefreshData(); } } catch (Exception ex) { Cura.Common.Common.LogError("Failed To Load Data In This Tab", ex); } }
private void tabcontrl_TabPageClosing(object sender, KRBTabControl.KRBTabControl.SelectedIndexChangingEventArgs e) { //temporary fix e.Cancel = true; }