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


Glossary Item Box

Occurs when the user changes the active sheet.

Syntax

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

Event Data

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

PropertyDescription
ActivatedSheetIndex Gets or sets the index of the new active sheet.
Cancel Gets or sets whether to cancel the active sheet change.

Remarks

This event is raised by the OnActiveSheetChanging method when the user is changing the active sheet.

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

Example

This example raises the ActiveSheetChanging event when the user clicks on another sheet.
C#Copy Code
fpSpread1.Sheets.Count = 3;
fpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always;

private void fpSpread1_ActiveSheetChanged(object sender, System.EventArgs e)
{
     ListBox1.Items.Add("Active Sheet Changing.");
}
Visual BasicCopy Code
FpSpread1.Sheets.Count = 3
FpSpread1.TabStripPolicy = FarPoint.Win.Spread.TabStripPolicy.Always

Private Sub FpSpread1_ActiveSheetChanging(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ActiveSheetChangingEventArgs)
Handles FpSpread1.ActiveSheetChanging
     ListBox1.Items.Add("Active Sheet Changing.")
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.