As in Microsoft Word, a Style object in True DBGrid can inherit its characteristics from another style, referred to as the parent style. For a newly created grid, the Normal style is the parent (or grandparent) of all named styles. Its default properties are as follows:
255 | |
System.Drawing.Color.White | |
System.Drawing.Color.White | |
None | |
BackgroundPictureDrawModeEnum.Stretch | |
Microsoft Sans Serif, 8.25pt | |
System.Drawing.Color.Black | |
None | |
ForegroundPicturePositionEnum.LeftOfText | |
False | |
None | |
AlignHorzEnum.General | |
False | |
0, 0, 0, 0 | |
Character | |
AlignVertEnum.Top | |
False |
The Heading and Footing styles are defined similarly. Each inherits from the Normal style, and each overrides the following properties:
System.Drawing.SystemColors.Control | |
System.Drawing.Color.Black | |
AlignVertEnum.Center |
The Heading style overrides one additional property that the Footing style does not:
True |
The Selected style also inherits from Normal and overrides two color properties:
System.Drawing.SystemColors.Highlight | |
System.Drawing.SystemColors.HighlightText |
The same is True of the HighlightRow style, which uses the inverse of the color settings for the default Normal style:
System.Drawing.SystemColors.Text | |
System.Drawing.SystemColors.HighlightText |
The EvenRow, OddRow, and FilterBar styles inherit from Normal, but only the EvenRow style overrides any properties:
System.Drawing.Color.Aqua |
The only styles that do not inherit directly from Normal are the Caption and RecordSelector styles, which inherit from the Heading style. The reason that grid and split captions are centered by default is that the Caption style specializes the following property:
AlignHorzEnum.Center |
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |