当前位置:编程学习 > C#/ASP.NET >>

传段文字,与各位无关

Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.dgvShow.RowHeadersWidth - 4, e.RowBounds.Height);                           TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), this.dgvShow.RowHeadersDefaultCellStyle.Font, rectangle,                                     this.dgvShow.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); --------------------编程问答-------------------- http://blog.csdn.net/hexianghong888/article/details/4579942 --------------------编程问答-------------------- Private Sub dgvRealDataCar_RowPostPaint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewRowPostPaintEventArgs) Handles dgvRealDataCar.RowPostPaint

        Dim brush As System.Drawing.Brush = New SolidBrush(dgvRealDataCar.RowHeadersDefaultCellStyle.ForeColor)

 

        e.Graphics.DrawString((e.RowIndex + 1).ToString(), dgvRealDataCar.DefaultCellStyle.Font, Brush, e.RowBounds.Location.X + 12, e.RowBounds.Y + 5)

 

    End Sub
--------------------编程问答-------------------- 楼主在求关注? --------------------编程问答-------------------- 已收到
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,