Occurs before the page footer is to be printed.
[Visual Basic]
Public Event OwnerDrawPageFooter As OwnerDrawPageEventHandler
[C#]
public event OwnerDrawPageEventHandler OwnerDrawPageFooter
[Delphi]
public property OwnerDrawPageFooter: OwnerDrawPageEventHandler read remove_OwnerDrawPageFooter write add_OwnerDrawPageFooter;
Remarks
This event is only raised for PrintInfo objects in which the PrintInfo.OwnerDrawPageFooter property is set to True.
The only property for this event is the OwnerDrawPageEventArgs.OwnerDrawPrint property. This event and OwnerDrawPageHeader event both use an object called the C1OwnerDrawPrint object to render the appropriate text and images. The OwnerDrawPageEventArgs.OwnerDrawPrint property provides access to this object that has one property and three methods to aid in rendering the correct images. For more information see the OwnerDrawPageEventArgs reference.
Example
The following code adds a custom footer to the grid when previewing and printing:
Private Sub C1TrueDBGrid1_OwnerDrawPageFooter(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.OwnerDrawPageEventArgs) Handles C1TrueDBGrid1.OwnerDrawPageFooter
Dim fnt As System.Drawing.Font = New System.Drawing.Font(Font, FontStyle.Bold)
e.OwnerDrawPrint.RenderDirectText(0, 0, "Created with C1TrueDBGrid", 1950, fnt, Color.LightSlateGray, C1.Win.C1TrueDBGrid.AlignHorzEnum.Far)
End Sub
· C#
private void c1TrueDBGrid1_OwnerDrawPageFooter(object sender, C1.Win.C1TrueDBGrid.OwnerDrawPageEventArgs e)
{
System.Drawing.Font fnt = new System.Drawing.Font(Font, FontStyle.Bold);
e.OwnerDrawPrint.RenderDirectText(0, 0, "Created with C1TrueDBGrid", 1950, fnt, Color.LightSlateGray, C1.Win.C1TrueDBGrid.AlignHorzEnum.Far);
}
· Delphi
procedure C1TrueDBGrid1_OwnerDrawPageFooter(sender: System.Object; e: C1.Win.C1TrueDBGrid.OwnerDrawPageEventArgs);
var
fnt: System.Drawing.Font;
begin
fnt := System.Drawing.Font.Create(Font, FontStyle.Bold);
e.OwnerDrawPrint.RenderDirectText(0, 0, 'Created with C1TrueDBGrid', 1950, fnt, Color.LightSlateGray, C1.Win.C1TrueDBGrid.AlignHorzEnum.Far);
end;
See Also
C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |