Exemple #1
0
 protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
 {
     e.Graphics.Clear(Color.White);
     using (Pen borderPen = TabBaseControl.GetBorderPen(Pages.TabColor))
     {
         e.Graphics.DrawLine(borderPen, 0, 0, 0, this.Height - 1);
         e.Graphics.DrawLine(borderPen, 0, this.Height - 1, this.Width - 1, this.Height - 1);
         e.Graphics.DrawLine(borderPen, this.Width - 1, 0, this.Width - 1, this.Height - 1);
     }
 }
Exemple #2
0
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            if ((this.Pages == null))
            {
                return;
            }


            int totalWidth = 0;

            foreach (Control ctl in this.Controls)
            {
                totalWidth += ctl.Width;
            }

            using (Pen borderPen = TabBaseControl.GetBorderPen(this.Pages.TabColor))
            {
                e.Graphics.DrawLine(borderPen, totalWidth, this.Height - 1, this.Width, this.Height - 1);
            }
        }