ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

PrintInfo.PageHeaderStyle Property

Gets or sets the style used to render the Page header.

[Visual Basic]

Public Property PageHeaderStyle As C1.Win.C1TrueDBGrid.Style

[C#]

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

[Delphi]

public property PageHeaderStyle: C1.Win.C1TrueDBGrid.Style read get_PageHeaderStyle write set_PageHeaderStyle;

Example

The following example sets the style for the page header:

·      Visual Basic

       Dim fntFont As Font

       fntFont = New Font(Me.C1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font.Name, Me.C1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font.Size, FontStyle.Italic)

       Me.C1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font = fntFont

       Me.C1TrueDBGrid1.PrintInfo.PageHeader = "Customers Table"

       ' Invoke print preview.

       Me.C1TrueDBGrid1.PrintInfo.PrintPreview()

·      C#

       Font fntFont;

       fntFont = new Font(this.c1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font.Name, this.c1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font.Size, FontStyle.Italic);

       this.c1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font = fntFont;

       this.c1TrueDBGrid1.PrintInfo.PageHeader = "Customers Table";

       // Invoke print preview.

       this.c1TrueDBGrid1.PrintInfo.PrintPreview();

·      Delphi

       var

         fntFont: Font;

       begin

         fntFont := Font.Create;

         Font(Self.C1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font.Name, Self.C1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font.Size, FontStyle.Italic);

         Self.C1TrueDBGrid1.PrintInfo.PageHeaderStyle.Font := fntFont;

         Self.C1TrueDBGrid1.PrintInfo.PageHeader := 'Customers Table';

         // Invoke print preview.

         Self.C1TrueDBGrid1.PrintInfo.PrintPreview;

       end;

For an example using the PageHeaderStyle property, see Tutorial 15 - PrintInfo and Print Preview.

See Also

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


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