Spread Windows Forms 6.0 Product Documentation
ChildWorkbookCreatedEventHandler Delegate
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace : ChildWorkbookCreatedEventHandler Delegate


sender
Source of the event
e
Event data

Glossary Item Box

Represents a defined method that handles the ChildWorkbookCreated event for the Spread component.

Syntax

Visual Basic (Declaration) 
Public Delegate Sub ChildWorkbookCreatedEventHandler( _
   ByVal sender As Object, _
   ByVal e As ChildWorkbookCreatedEventArgs _
) 
Visual Basic (Usage)Copy Code
Dim instance As New ChildWorkbookCreatedEventHandler(AddressOf HandlerMethod)
C# 
public delegate void ChildWorkbookCreatedEventHandler( 
   object sender,
   ChildWorkbookCreatedEventArgs e
)

Parameters

sender
Source of the event
e
Event data

Remarks

For information on the event, refer to the FpSpread ChildWorkbookCreated event.

Example

This example changes the background color of the alternating rows in the workbook.
C#Copy Code
fpSpread1.ChildWorkbookCreated += new FarPoint.Win.Spread.ChildWorkbookCreatedEventHandler(fpSpread1ChildWorkbookCreated);

private void fpSpread1ChildWorkbookCreated(object sender, FarPoint.Win.Spread.ChildWorkbookCreatedEventArgs e)
{
      e.Workbook.Sheets[e.Workbook.ActiveSheetIndex].AlternatingRows[0].BackColor = Color.Yellow;
}
Visual BasicCopy Code
Dim eh As FarPoint.Win.Spread.ChildWorkbookCreatedEventHandler = AddressOf FpSpread1ChildWorkbookCreated
AddHandler FpSpread1.ChildWorkbookCreated, eh

Private Sub FpSpread1ChildWorkbookCreated(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ChildWorkbookCreatedEventArgs)
Handles FpSpread1.ChildWorkbookCreated
      e.Workbook.Sheets(e.Workbook.ActiveSheetIndex).AlternatingRows(0).BackColor = Color.Yellow
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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