以文本方式查看主题

-  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=145280)

--  作者:pc005637
--  发布时间:2020/1/14 17:31:00
--  专业报表,设定表格中其中一个单元格无网格线如何操作?

网格线

表格的样式(Style)有一个名为GridLines的子属性,用于设置网格线。

GridLines本身又包括以下子属性:

All:    所有网格线
Bottom:底边框
Left:   左边框
Right: 右边框
Top:   上边框
Horz:  水平网格线
Vert:  垂直网格线


请问如何操作?求代码或思路。


--  作者:有点蓝
--  发布时间:2020/1/14 17:37:00
--  
rt.Cells(0,0).Style.GridLines.All = New Prt.LineDef(Color.White)
--  作者:pc005637
--  发布时间:2020/1/14 17:41:00
--  不好意思,是取消网格线。
不好意思,是取消网格线。不显示
[此贴子已经被作者于2020/1/14 17:42:41编辑过]

--  作者:有点蓝
--  发布时间:2020/1/14 20:26:00
--  
Dim doc As New PrintDoc \'定义一个报表
Dim rt As New prt.RenderTable() \'定义一个表格对象
doc.Body.Children.Add(rt) \'将表格对象加入到报表中
rt.Style.GridLines.All = New prt.Linedef \'设置网格线
\'下面的代码向表格中填入值
For r As Integer = 0 To 5 
    For c As Integer = 0 To 5
        Dim rx As New prt.RenderText \'定义一个文本对象
        rx.Text = r & "," & c \'为文本对象设置内容
        rt.Cells(r, c).RenderObject = rx \'将文本对象放置在单元格中
    Next
Next

rt.Cells(1,1).Style.GridLines.All = New Prt.LineDef(0,Color.White)
doc.Preview() \'预览报表