Exemplo n.º 1
0
        void DrawHeaderBorder(DrawHeaderEventArgs e)
        {
            Graphics  g = e.Graphics;
            Rectangle r = new Rectangle(e.Bounds.Left, e.Bounds.Top, e.Bounds.Width, e.Bounds.Height);

            if (r.Left == 0)
            {
                g.DrawLine(/*SystemPens.ControlLightLight*/ borderPen, r.Left, r.Bottom, r.Left, r.Top);
            }
            if (r.Top == 0)
            {
                g.DrawLine(/*SystemPens.ControlLightLight*/ borderPen, r.Left, r.Top, r.Right, r.Top);
            }
            if (r.Bottom == e.HeaderHeight)
            {
                g.DrawLine(/*SystemPens.ControlDark*/ borderPen, r.Left, r.Bottom - 1, r.Right, r.Bottom - 1);
            }
        }
Exemplo n.º 2
0
		void DrawHeaderBorder(DrawHeaderEventArgs e)
		{
			Graphics g = e.Graphics;
			Rectangle r = new Rectangle(e.Bounds.Left,e.Bounds.Top,e.Bounds.Width,e.Bounds.Height);
			if(r.Left == 0)
				g.DrawLine(/*SystemPens.ControlLightLight*/borderPen,r.Left,r.Bottom,r.Left,r.Top);
			if(r.Top == 0)
				g.DrawLine(/*SystemPens.ControlLightLight*/borderPen,r.Left,r.Top,r.Right,r.Top);
			if(r.Bottom == e.HeaderHeight)
				g.DrawLine(/*SystemPens.ControlDark*/borderPen,r.Left,r.Bottom-1,r.Right,r.Bottom-1);
		}