WinForm中DataGridView折叠控件【超好看】(5)

using (Pen p = new Pen(Color.GhostWhite)) { var iHalfWidth = (e.RowBounds.Left + sender.RowHeadersWidth) / 2; var oPointHLineStart = new Point(rect1.X + iHalfWidth, rect1.Y); var oPointHLineEnd = new Point(rect1.X + iHalfWidth, rect1.Y + rect1.Height / 2); e.Graphics.DrawLine(p, oPointHLineStart, oPointHLineEnd); //折叠线 e.Graphics.DrawLine(p, oPointHLineEnd, new Point(oPointHLineEnd.X + iHalfWidth, oPointHLineEnd.Y)); }


效果如下:

WinForm中DataGridView折叠控件【超好看】

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjwwwj.html