Foxtable(狐表)用户栏目专家坐堂 → 关于单元格绘制与逻辑列联动的问题


  共有1926人关注过本帖树形打印复制链接

主题:关于单元格绘制与逻辑列联动的问题

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/1/21 16:28:00 [显示全部帖子]

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

 回到顶部