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


Glossary Item Box

Occurs when the left column changes.

Syntax

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

Event Data

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

PropertyDescription
ColumnViewportIndex Gets the index of the viewport column in which the change occurred.
NewLeft Gets the index of the new left column.
OldLeft Gets the index of the previous left column.

Remarks

This event is raised by the OnLeftChange method when a different column becomes the new leftmost column.

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

Example

This example raises the LeftChange event when the leftmost column changes.
C#Copy Code
fpSpread1.AddViewport(0, 0);
fpSpread1.ShowColumn(0, 5, FarPoint.Win.Spread.HorizontalPosition.Left);

private void fpSpread1_LeftChange(object sender, FarPoint.Win.Spread.LeftChangeEventArgs e)
{
     ListBox1.Items.Add("LeftChange event fired!");
}
Visual BasicCopy Code
FpSpread1.AddViewport(0, 0)
FpSpread1.ShowColumn(0, 5, FarPoint.Win.Spread.HorizontalPosition.Left)

Private Sub FpSpread1_LeftChange(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.LeftChangeEventArgs) Handles FpSpread1.LeftChange
     ListBox1.Items.Add("LeftChange event fired!")
End Sub

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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