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()
|