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 Column

Changing the Font of a Table Column

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

      Visual Basic

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

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

      C#

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

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

This topic illustrates the following:

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

 


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