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


In This Topic
    ColumnWidthChanged Event
    In This Topic
    Occurs when the column width has changed.
    Syntax
    'Declaration
     
    Public Event ColumnWidthChanged As ColumnWidthChangedEventHandler
    'Usage
     
    Dim instance As FpSpread
    Dim handler As ColumnWidthChangedEventHandler
     
    AddHandler instance.ColumnWidthChanged, handler
    public event ColumnWidthChangedEventHandler ColumnWidthChanged
    Event Data

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

    PropertyDescription
    Gets the list of columns whose widths have changed.  
    Gets whether the column indexes are row header columns.  
    Gets the view that contains the columns whose widths have changed.  
    Remarks

    This event is raised by the OnColumnWidthChanged method when the column width has changed.

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

    If you want to catch the event of a user changing the width of the columns in the row header, you need to map the SheetView.DocumentModels class, RowHeaderColumnAxis property, Changed event.

    Example
    This example raises the event.
    private void fpSpread1_ColumnWidthChanged(object sender, FarPoint.Win.Spread.ColumnWidthChangedEventArgs e)
    {
         ListBox1.Items.Add("ColumnWidthChanged event fired!");
    }
    Private Sub FpSpread1_ColumnWidthChanged(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ColumnWidthChangedEventArgs)
    Handles FpSpread1.RowHeightChanged
         ListBox1.Items.Add("ColumnWidthChanged event fired!")
    End Sub
    
    See Also