ComponentOne Preview Classic for WinForms: Preview Classic for WinForms Task-Based Help > Changing the Font Style in a Table > Changing the Font of a Table Row

Changing the Font of a Table Row

To change the font of a table row, set the Font property for the row. Add the following code to the Form_Load event:

      Visual Basic

Dim table As C1.C1PrintDocument.RenderTable = New C1.C1PrintDocument.RenderTable(Me.C1PrintDocument1)

table.Body.Rows(0).StyleTableCell.Font = New Font("Arial", 12, FontStyle.Bold)

      C#

C1.C1PrintDocument.RenderTable table = new C1.C1PrintDocument.RenderTable(this.c1PrintDocument1);

table.Body.Rows[0].StyleTableCell.Font = new Font("Arial", 12, FontStyle.Bold);

This topic illustrates the following:

The text in the first row appears in 12 point, Bold font.

 


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.