| How to Use Styles > Applying Styles to Cells |
True DBList gives you three ways to control the display characteristics of individual cells:
|
By Contents |
You can specify a pattern (called a regular expression) that is used to perform pattern matching on cell contents. When the contents match the pattern supplied in the AddRegexCellStyle method, True DBList will automatically apply pre-selected style attributes to the cell. |
|
By Custom Criteria |
Using the FetchCellStyle (or FetchRowStyle) event, you can make decisions about cell colors and fonts each time a cell (or row) is displayed. |
You can use Style objects defined at design time as arguments to the AddRegexCellStyle method. Or, you can create a temporary style in code and use it to specialize one or more attributes.
The FetchCellStyle and FetchRowStyle events pass a temporary Style object as the final parameter. By setting its properties, you can control the appearance of the cell specified by the other event parameters.
In this version of True DBList, per-cell font and color control can only be achieved by writing code. However, by creating styles at design time, you can keep this code to a minimum. To learn how to create named styles at design time, see Using the Style Factory property page.