以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  单元格 绘图报错  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=142430)

--  作者:yifan3429
--  发布时间:2019/10/26 21:27:00
--  单元格 绘图报错
If e.Col.Name =  "审核"  Then
    e.StartDraw() \'开始单元格绘图
    If e.Row("审核").txet.Contains("已") Then
            e.Style =  "红色字体"
        Dim n As New Pen(Color.Green, 5)  \'获得一个绿色的宽度为5的画笔
        \'划线颜色和宽度
        e.Graphics.DrawRectangle(n,e.x + 1,e.y + 8, e.Width-4 ,e.Height-2)  \'画个框子
        e.EndDraw
    End If
End If



.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2019.10.19.1
错误所在事件:表,fox代码,DrawCell
详细错误信息:
调用的目标发生了异常。
未找到类型“String”的公共成员“txet”。

[此贴子已经被作者于2019/10/26 22:12:39编辑过]

--  作者:程兴刚
--  发布时间:2019/10/26 21:57:00
--  
If e.Col.Name =  "审核"  Then
    e.StartDraw() \'开始单元格绘图
    If e.Row("审核").txet.Contains("已") Then
        e.Style =  "红色字体"
        e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 8, e.Width-4 ,e.Height-2)
        e.EndDraw()
    End If
End If

--  作者:yifan3429
--  发布时间:2019/10/26 22:18:00
--  
.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2019.10.19.1
错误所在事件:表,fox代码,DrawCell
详细错误信息:
调用的目标发生了异常。
未找到类型“Boolean”的公共成员“txet”。

--  作者:程兴刚
--  发布时间:2019/10/26 22:54:00
--  
被您带沟里了!
If e.Col.Name =  "审核"  Then
    e.StartDraw() \'开始单元格绘图
dim s as string
    If s.Contains("已") Then
        e.Style =  "红色字体"
        e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 8, e.Width-4 ,e.Height-2)
        e.EndDraw()
    End If
End If
[此贴子已经被作者于2019/10/26 22:57:25编辑过]

--  作者:有点蓝
--  发布时间:2019/10/27 20:27:00
--  
If e.Row("审核").txet.Contains("已") Then

改为

If e.text.Contains("已") Then