ComponentOne Reports for WinForms Designer Edition: ComponentOne Reports for WinForms > Printing and Previewing Task-Based Help > Formatting Tables > Changing the Font in a Single Table Cell

Changing the Font in a Single Table Cell

To change the font in a single table cell, set the Font property for the cell. Add the following code to the Form_Load event before the Add and Generate methods:

      Visual Basic

table.Cells(1, 1).Style.Font = New Font("Tahoma", 12, FontStyle.Bold)

table.Cells(1, 1).Style.TextColor = Color.DarkGreen

      C#

table.Cells[1, 1].Style.Font = new Font("Tahoma", 12, FontStyle.Bold);

table.Cells[1, 1].Style.TextColor = Color.DarkGreen;

 What You've Accomplished

The text in cell (1,1) appears in 12 point, Dark Green, Bold Tahoma font:

 


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