ComponentOne List for WinForms
In This Topic
    Example 6 - Changing the BackColor Property
    In This Topic

    In the first example, setting the Font member of the list's Style property affected the entire list, including each caption bar, column header, and column footer. However, the same is not true of the BackColor and ForeColor properties. Since the built-in Caption, Heading, and Footing styles override both of these properties, only the data cells of the list are displayed with a teal background.

    The following code chages the font member of the Style property:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1List1.Style.BackColor = System.Drawing.Color.Teal
    

    To write code in C#

    C#
    Copy Code
    this.c1List1.Style.BackColor = System.Drawing.Color.Teal;