以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]单元格绘图,怎么样设置所有列均可绘图?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=92312)

--  作者:雪风
--  发布时间:2016/10/31 17:11:00
--  [求助]单元格绘图,怎么样设置所有列均可绘图?
请教各位大神,所有列均可绘图如何写代码,下面这段代码出错了。

For Each cc As Col In CurrentTable.Cols
    e.StartDraw()
    Dim Width As Integer = (e.Width - 2 )* e.Row("cc.name") \\ 100
    If e.Row("cc.name") = 100 Then
        e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2)
    Else
        e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2)
    End If
   e.EndDraw()
Next


--  作者:有点蓝
--  发布时间:2016/10/31 17:48:00
--  
e.StartDraw()
Dim Width As Integer = (e.Width - 2 )* e.Row(e.Col.name) \\ 100
If e.Row(e.Col.name) = 100 Then
    e.Graphics.FillRectangle(Brushes.Green,e.x + 1,e.y + 1, Width, e.Height - 2)
Else
    e.Graphics.FillRectangle(Brushes.Red,e.x + 1,e.y + 1, Width, e.Height - 2)
End If
e.EndDraw()

--  作者:雪风
--  发布时间:2016/10/31 18:11:00
--  
如何实现所填值为负值,从右侧开始绘制,相当于单元格左侧是白色,右侧是红色。
--  作者:有点蓝
--  发布时间:2016/10/31 20:07:00
--  
截图上例子说明