ComponentOne List for WinForms
In This Topic
    Anonymous Style Inheritance
    In This Topic

    Just as one named style can inherit font, color, and formatting characteristics from another, an anonymous style in a Split object can inherit from its counterpart in the containing C1List control. Similarly, an anonymous style in a C1DisplayColumn object can inherit from its counterpart in the containing Split object. Since the C1Combo control does not have a Splits collection, the anonymous styles of its C1DisplayColumn objects can inherit values from the control itself.

    When a list is first created, its Style property inherits all of its attributes from the built-in Normal style, which controls the appearance of all data cells. Any changes to the Normal style are propagated to all splits, and in turn to the columns within each split. However, you can change the appearance of all data cells within a Split or C1DisplayColumn object by modifying the members of its anonymous Style property.

    Consider the following list layout, which uses the default values of all built-in styles and contains two identical splits.

    All of the subsequent examples use this layout as a starting point. For clarity, the examples use code to illustrate the relationships between style properties and the list's display; however, you can perform the same operations at design time using the list's collection editors.

    See Also