以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  如何判断某单元格的背景色和边框  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=71055)

--  作者:hdffzxf
--  发布时间:2015/7/3 19:56:00
--  如何判断某单元格的背景色和边框

    Dim cs As C1.Win.C1FlexGrid.CellStyle= t.grid.Styles.Add("Test")
    cs.backColor=Color.Transparent
    cs.Border.Color = t.Grid.Styles.Normal.Border.Color
    cs.Border.Style = C1.Win.C1FlexGrid.BorderStyleEnum.flat

    t.Grid.SetCellStyle(5,6,cs)

 

上述是着色和边框的功能,反过来,如何我想得到某个单元格的背景色,怎么得到呢?


--  作者:hdffzxf
--  发布时间:2015/7/4 17:35:00
--  
顶一下!
--  作者:逛逛
--  发布时间:2015/7/4 18:57:00
--  

Dim cs As C1.Win.C1FlexGrid.CellStyle = t.Grid.GetCellStyle(5,6)

OUTPUT.SHOW(cs.Border.Color.ToArgb)


--  作者:hdffzxf
--  发布时间:2015/11/4 18:56:00
--  
老贴追问,我的意思是如何知道当前单元格设置了cs的样式?
[此贴子已经被作者于2015/11/4 18:56:03编辑过]

--  作者:大红袍
--  发布时间:2015/11/4 19:13:00
--  
反过来是不行的,不会记录其样式的。而且你1楼设置的样式,也是临时的。