以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 在选定的单元格画颜色,drawcel (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=121091) |
-- 作者:lur320 -- 发布时间:2018/6/29 8:13:00 -- 在选定的单元格画颜色,drawcel If e.Row.Isnull("highlight")=False Then Dim te As String() te=e.Row("highlight").split("|") te列的内容是29|30|-8323328,代表起始列和结束列的位置和颜色 Dim line1,line2 As Integer Dim Colo As Double line1=val(te(0)) line2=val(te(1)) Colo=val(te(2)) Dim clr As Color = Color.FromARGB(Colo) CurrentTable.DataTable.AddUserStyle(Colo,clr,Color.black ) If e.Col.Index < line1 Or e.Col.Index > line2 Then 在范围内的时候,标注那个颜色。 Else e.style=Colo End If End If 报错信息:Exception has been thrown by the target of an invocation. Index was outside the bounds of the array. 为何? |
-- 作者:lur320 -- 发布时间:2018/6/29 8:28:00 -- 问题解决了。数据堆里面有数据不符合29|30|-8323328的格式 |
-- 作者:有点甜 -- 发布时间:2018/6/29 9:02:00 -- 参考
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=100242&skin=0
|