Example #1
0
        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);
            }
        }
Example #2
0
 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);
         }
     }
 }
Example #3
0
 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);
         }
     }
 }
Example #4
0
 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);
     }
 }