以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  单元格图片  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=137691)

--  作者:BATASC750206
--  发布时间:2019/7/12 17:40:00
--  单元格图片
单元格图片列,有一个单元格不能找到匹配的图片时,其它的所有单元格图片都不能显示!请问要如何避免这种情况?代码要如何写?
If e.Col.name= "图片" Then
    e.StartDraw
    If e.Row("图片") > "" Then
        e.Graphics.DrawImage(getimage(projectPath & "attachments\\" & e.Row("图片")), e.x + 3,e.y + 3, 50, 50) \'绘制第一个图标
    End If
    e.text = ""
    e.EndDraw
End If
[此贴子已经被作者于2019/7/12 17:40:22编辑过]

--  作者:有点蓝
--  发布时间:2019/7/12 20:36:00
--  
If e.Col.name= "图片" Then
    e.StartDraw
    If e.Row("图片") > "" Then
        Dim file As String = projectPath & "attachments\\" & e.Row("图片")
        If FileSys.FileExists(file) Then
            e.Graphics.DrawImage(getimage(file), e.x + 3,e.y + 3, 50, 50) \'绘制第一个图标
        End If
    End If
    e.text = ""
    e.EndDraw
End If

--  作者:BATASC750206
--  发布时间:2019/7/13 7:50:00
--  厉害了!
谢谢!