Spread Windows Forms 6.0 Product Documentation
ChildWorkbookCreated Event
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : ChildWorkbookCreated Event


Glossary Item Box

Occurs when a child workbook of the Spread component is created.

Syntax

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

Event Data

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

PropertyDescription
Workbook Gets the child SpreadView object being created.

Remarks

This event is raised by the OnChildWorkbookCreated method when a child workbook has been created.

For more details on the individual event arguments, refer to ChildWorkbookCreatedEventArgs members.

Example

This example raises the ChildWorkbookCreated event.
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.