Foxtable(狐表)用户栏目专家坐堂 → 打印


  共有2623人关注过本帖树形打印复制链接

主题:打印

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/10/17 10:42:00 [显示全部帖子]

比如代码

 

Dim doc As PrintDoc = e.Form.GernatePrintDoc()
For Each c As object In Doc.Body.Children
    If Typeof c Is prt.RenderTable Then
        Dim t As prt.RenderTable = c
        t.Rows(0).Style.Font = new font("宋体", 15, fontstyle.bold)
        t.Rows(t.Rows.count-1).Style.Font = new font("宋体", 15, fontstyle.bold)
    End If
Next
Doc.Preview


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/10/21 13:04:00 [显示全部帖子]

Dim tb  As WinForm.TabControl = e.Form.Controls("TabControl1")
Dim pg  As WinForm.TabPage = tb.SelectedPage
Dim doc  As PrintDoc = e.Form.GernatePrintDoc(pg)
For Each c As object In Doc.Body.Children
    If Typeof c Is prt.RenderTable Then
        Dim t As prt.RenderTable = c
        t.Rows(0).Style.Font = new font("宋体", 10, fontstyle.bold)
        t.Rows(t.Rows.count-1).Style.Font = new font("宋体", 10, fontstyle.bold)
        For i As Integer = 1 To t.Rows.count-2
           
            For j As Integer = 0 To t.Cols.count-1
                t.cells(i,j).Style.BackColor = Color.white
                t.cells(i,j).Style.TextColor = Color.black
            Next
           
        Next
    End If
Next
doc.Preview()

 回到顶部