In earlier versions of True DBGrid for WinForms, styles were used to specify font, color, and alignment attributes. This version extends the concept of styles to include background and foreground pictures, enabling adornments to be added to headers, footers, and caption bars, specify a background pattern for data cells, and render picture data in cells without having to populate a ValueItems object. The following properties of the Style object determine how pictures are displayed:
Property | Description |
---|---|
BackgroundImage | Sets/returns a style's background picture. |
BackgroundPictureDrawMode | Controls how a style's background picture is displayed. |
ForegroundImage | Sets/returns a style's foreground picture. |
ForeGroundPicturePosition | Controls how a style's foreground picture is positioned. |
Since picture properties follow the same inheritance rules as other style attributes, any technique described earlier in this chapter also works with pictures. This means that pictures can be attached to a grid element using any of the following methods: