Object Model > Style Object, Styles Collection |
Style objects encapsulate font, color, picture, and formatting information for a TDBGrid, TDBDropDown, Split, or Column object. The Style object is a very flexible and powerful tool that provides Excel- and Word-like formatting capabilities for controlling the appearance of the grid's display.
When a TDBGrid or TDBDropDown control is created, it contains ten built-in styles. You can modify the built-in styles or add your own styles at either design time or run time. Both controls also support several optional events that use Style objects to convey formatting information on a per-cell or per-row basis.
The TDBGrid and TDBDropDown controls store all built-in and user-defined Style objects in the Styles collection. You can access the members of this collection by name at run time, then apply them to a grid, column, or split in order to control the appearance of the object in question. This collection is accessed using the Styles property.