以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助] 自定义单元格样式没作用 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=179493) |
||||
-- 作者:建筑人生 -- 发布时间:2022/8/26 13:33:00 -- [求助] 自定义单元格样式没作用 S elect Case e.DataCol.Name Case "级别" Dim c1, c2, c3 As color Dim s1, s2, s3 As String Dim ss1(), ss2(), ss3() As String Dim dt As DataTable = DataTables("颜色") s1 = dt.DataRows(0)("一级") s2 = dt.DataRows(0)("二级") s3 = dt.DataRows(0)("三级") If s1 Like "*[;]*" = False Then c1 = Color.FromName(s1) Else ss1 = s1.split(";") c1 = Color.FromARGB(255, CInt(ss1(0)), CInt(ss1(1)), CInt(ss1(2))) End If If s2 Like "*[;]*" = False Then c2 = Color.FromName(s2) Else ss2 = s2.split(";") c2 = Color.FromARGB(255, CInt(ss2(0)), CInt(ss2(1)), CInt(ss2(2))) End If If s3 Like "*[;]*" = False Then c3 = Color.FromName(s3) Else ss3 = s3.split(";") c3 = Color.FromARGB(255, CInt(ss3(0)), CInt(ss3(1)), CInt(ss3(2))) End If Dim dt2 As DataTable = DataTables("表格样式") dt2.AddUserStyle("一级", c1, color.Black) dt2.AddUserStyle("二级", c2, color.Black) dt2.AddUserStyle("三级", c3, color.Black) End S elect
|
||||
-- 作者:有点蓝 -- 发布时间:2022/8/26 14:25:00 --
|