If e.Col.Name = "审核状态" Then e.StartDraw() Dim w As Integer = e.Width - 4 Dim h As Integer = e.Height - 4 Dim x As Integer = e.x + (e.Width - w)/2 Dim n As Pen Dim fnt As New Font("黑体",9) Dim br As object Dim msg As String If e.Row("审核") = True Then n = New Pen(Color.Blue,2) br = New SolidBrush(color.Blue) msg = "已审核" Else n = New Pen(Color.Red,2) br = New SolidBrush(color.red) msg = "未审核" End If e.Graphics.DrawRectangle(n,x,e.y + 2,w,h) e.Graphics.DrawString(msg,fnt,br,x + 1,e.y + 4) e.Text = "" e.EndDraw() End If
|