public void OnCloseBtnClick(object o, EventArgs e) { int tabPage = GetTabOfWidget(o); if (tabPage > 0) { if (TabClosing != null) { TabClosingArgs args = new TabClosingArgs(); args.tabIndex = tabPage; TabClosing.Invoke(this, args); } notebook1.RemovePage(tabPage); } }
public void on_eventbox1_button_press_event(object o, ButtonPressEventArgs e) { if (e.Event.Button == 2) { int tabPage = GetTabOfWidget(o); notebook1.CurrentPage = tabPage; if (tabPage > 0) { if (TabClosing != null) { TabClosingArgs args = new TabClosingArgs(); args.tabIndex = tabPage; TabClosing.Invoke(this, args); } notebook1.RemovePage(tabPage); } } }
public void on_eventbox1_button_press_event(object o, ButtonPressEventArgs e) { if (e.Event.Button == 2) { int tabPage = GetTabOfWidget(o); notebook1.CurrentPage = tabPage; if (tabPage > 0) { if (TabClosing != null) { TabClosingArgs args = new TabClosingArgs(); args.tabIndex = tabPage; TabClosing.Invoke(this, args); } notebook1.RemovePage(tabPage); } } }
public void OnCloseBtnClick(object o, EventArgs e) { int tabPage = GetTabOfWidget(o); if (tabPage > 0) { if (TabClosing != null) { TabClosingArgs args = new TabClosingArgs(); args.tabIndex = tabPage; TabClosing.Invoke(this, args); } notebook1.RemovePage(tabPage); } }