ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Example 4 - Affecting Only Data Cells in the First Column of the First Split

In this example, only the data cells of the first column of the first split are affected. This is because the column headers and column footers inherit their fonts from the built-in styles Heading and Footing, respectively.

The following code affects data cells only in the first column of the first split:

·      Visual Basic

Dim myfont As Font

myfont = New Font (Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.Font, FontStyle.Bold)

Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).Style.Font = myfont

·      C#

Font myfont;

myfont = new Font (this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold);

this.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font = myfont;

·      Delphi

var myfont: Font;

 

myfont := Font.Create(Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font, FontStyle.Bold);

Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].Style.Font := myfont;

 


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