ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.CaptionStyle Property

Gets or sets the Style object that controls the appearance of the caption area.

[Visual Basic]

Public Property CaptionStyle As C1.Win.C1TrueDBGrid.Style

[C#]

public C1.Win.C1TrueDBGrid.Style CaptionStyle {get;set;}

[Delphi]

public property CaptionStyle: C1.Win.C1TrueDBGrid.Style read get_CaptionStyle write set_CaptionStyle;

Remarks

The value of the Caption property is not affected by changes to the CaptionStyle property.

Example

The following code uses the CaptionStyle property to change the appearance of the caption area to have a black background with white and bold text:

·      Visual Basic

       Me.C1TrueDBGrid1.CaptionStyle.BackColor = Color.Black

       Me.C1TrueDBGrid1.CaptionStyle.ForeColor = Color.White

       Me.C1TrueDBGrid1.CaptionStyle.Font = New Font(Font, FontStyle.Bold)

·      C#

       this.c1TrueDBGrid1.CaptionStyle.BackColor = Color.Black;

       this.c1TrueDBGrid1.CaptionStyle.ForeColor = Color.White;

       this.c1TrueDBGrid1.CaptionStyle.Font = new Font(Font, FontStyle.Bold);

·      Delphi

       with Self.C1TrueDBGrid1.CaptionStyle do

       begin

         BackColor := Color.Black;

         ForeColor := Color.White;

         Font := Font.Create(Font, FontStyle.Bold);

       end;

For examples demonstrating the CaptionStyle property, see the Modifying a Style Property Directly and Displaying Background Pictures topics.

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.