ComponentOne List for WinForms
In This Topic
    Example 2 - Affecting Data Cells Only in the First Split
    In This Topic

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

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

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Dim myfont As Font        
    myfont = New Font(Me.C1List1.Splits(0).Style.Font, FontStyle.Bold)        
    Me.C1List1.Splits(0).Style.Font = myfont
    

    To write code in C#

    C#
    Copy Code
    Font myfont;        
    myfont = new Font(this.c1List1.Splits[0].Style.Font, FontStyle.Bold);        
    this.c1List1.Splits[0].Style.Font = myfont;