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


In This Topic
    UserZooming Event
    In This Topic
    Occurs when the user zooms.
    Syntax
    'Declaration
     
    Public Event UserZooming As UserZoomingEventHandler
    'Usage
     
    Dim instance As FpSpread
    Dim handler As UserZoomingEventHandler
     
    AddHandler instance.UserZooming, handler
    public event UserZoomingEventHandler UserZooming
    Event Data

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

    PropertyDescription
    Gets or sets the new zoom factor of the spread.  
    Gets the old zoom factor of the spread.  
    Remarks

    This event is raised by the OnUserZooming method when the user zooms.

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

    Example
    This example returns the old and new zoom factors.
    fpSpread1.AllowUserZoom =true; 
    
    private void fpSpread1_UserZooming(object sender, FarPoint.Win.Spread.ZoomEventArgs e)
    {
       listBox1.Items.Add(e.NewZoomFactor);
       listBox1.Items.Add(e.OldZoomFactor);
    }
    
    FpSpread1.AllowUserZoom = True 
    
    Private Sub FpSpread1_UserZooming(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ZoomEventArgs) Handles FpSpread1.UserZooming
       ListBox1.Items.Add(e.NewZoomFactor)
       ListBox1.Items.Add(e.OldZoomFactor)
    End Sub
    
    See Also