Since the default values of all built-in styles are in effect, columns inherit from their containing splits, which in turn inherit from the grid as a whole. Therefore, this statement affects not only data cells, but also all headers, footers, and caption bars. This statement has the same visual effect as changing the Normal style directly using the C1TrueDBGrid Style Editor; however, the built-in Normal style itself is not changed.
The following code inherits values from the containing splits:
Dim myfont As Font
myfont = New Font (Me.C1TrueDBGrid1.Styles("Normal").Font, FontStyle.Bold)
Me.C1TrueDBGrid1.Styles("Normal").Font = myfont
· C#
Font myfont;
myfont = new Font (this.C1TrueDBGrid1.Styles["Normal"].Font, FontStyle.Bold);
this.C1TrueDBGrid1.Styles["Normal"].Font = myfont;
· Delphi
var myfont: Font;
myfont := Font.Create(Self.C1TrueDBGrid1.Styles['Normal'].Font, FontStyle.Bold);
Self.C1TrueDBGrid1.Styles['Normal'].Font := myfont;
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |