Spread for ASP.NET 7.0 Product Documentation
PrintBackground Event
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FpSpread Class : PrintBackground Event


Glossary Item Box

Occurs before each page is printed.

Syntax

Visual Basic (Declaration) 
Public Event PrintBackground As PrintBackgroundEventHandler
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim handler As PrintBackgroundEventHandler
 
AddHandler instance.PrintBackground, handler
C# 
public event PrintBackgroundEventHandler PrintBackground

Event Data

The event handler receives an argument of type PrintBackgroundEventArgs containing data related to this event. The following PrintBackgroundEventArgs properties provide information specific to this event.

PropertyDescription
Graphics Gets or sets the graphics device that does the printing.
PageNumber Gets or sets the current page being printed.
SheetRectangle Gets or sets the rectangle area representing the sheet.

Example

This example uses the PrintBackground event.
C#Copy Code
protected void FpSpread1_PrintBackground(object sender, FarPoint.Web.Spread.PrintBackgroundEventArgs e)
        {
            ListBox1.Items.Add(e.PageNumber.ToString());
        }
VB.NETCopy Code
Protected Sub FpSpread1_PrintBackground(sender As Object, e As FarPoint.Web.Spread.PrintBackgroundEventArgs) Handles FpSpread1.PrintBackground
      ListBox1.Items.Add(e.PageNumber.ToString())
End Sub

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.