Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / FpSpread Class / TopChange Event

In This Topic
    TopChange Event
    In This Topic
    Occurs when the top row changes.
    Public Event TopChange As TopChangeEventHandler
    Dim instance As FpSpread
    Dim handler As TopChangeEventHandler
    AddHandler instance.TopChange, handler
    public event TopChangeEventHandler TopChange
    Event Data

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

    Gets the index of the new top row.  
    Gets the index of the previous top row.  
    Gets the index of the viewport row in which the change occurred.  

    This event is raised by the OnTopChange method when a different row becomes the new top row.

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

    This example raises the TopChange event.
    private void fpSpread1_TopChange(object sender, FarPoint.Win.Spread.TopChangeEventArgs e)
          Label1.Text = "The new top is " + e.NewTop.ToString;
    Private Sub FpSpread1_TopChange(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.TopChangeEventArgs) Handles FpSpread1.TopChange
         Label1.Text = "The new top is " & e.NewTop.ToString
    End Sub
    See Also