Exemplo n.º 1
0
        void TabPagesInsertComplete(object sender, NetTabPageEventArgs e)
        {
            Controls.Add(e.Page);
            if (SelectedIndex == -1)
            {
                SelectedIndex = 0;
            }

            e.Page.UpdateBackground();
        }
Exemplo n.º 2
0
 void TabPagesRemoveComplete(object sender, NetTabPageEventArgs e)
 {
     Controls.Remove(e.Page);
     if (SelectedIndex >= TabPages.Count)
     {
         if (TabPages.Count == 0)
         {
             currentPage = -1;
         }
         else
         {
             SelectedIndex = TabPages.Count - 1;
             TabPages[SelectedIndex].UpdateBackground();
         }
     }
 }