以文本方式查看主题

-  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=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
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:单元格样式.table


--  作者:有点蓝
--  发布时间:2022/8/26 14:25:00
--  
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:单元格样式.zip