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


In This Topic
    ComboSelChange Event
    In This Topic
    Occurs when the user changes the selection in a combo box in a cell.
    Syntax
    'Declaration
     
    Public Event ComboSelChange As EditorNotifyEventHandler
    'Usage
     
    Dim instance As FpSpread
    Dim handler As EditorNotifyEventHandler
     
    AddHandler instance.ComboSelChange, handler
    public event EditorNotifyEventHandler ComboSelChange
    Event Data

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

    PropertyDescription
    Gets the column index of the cell with the editor that raised the event.  
    Gets the Control object that raises the event.  
    Gets the row index of the cell with the editor that raised the event.  
    Gets the view that contains the cell with the editor that raised the event.  
    Remarks

    This event is raised by the OnComboSelChange method when the same item in a combo box drop-down list is selected or another item is selected. The selected item changes when the user clicks another list item or presses the arrow keys to highlight other items in the list.

    Use this event to update a combo box list before the user closes the list. The ComboDropDown event occurs before this event; the ComboCloseUp event occurs after this event.

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

    Example
    This example raises several of the combo box related events when the user clicks on a combo box button and makes a selection from the list.
    FarPoint.Win.Spread.CellType.ComboBoxCellType cb = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
    fpSpread1.ActiveSheet.Cells[0, 0].CellType = cb;
    
    private void fpSpread1_ComboCloseUp(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
    {
         ListBox1.Items.Add("ComboCloseUp event fired");
    }
    
    private void fpSpread1_ComboDropDown(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
    {
         ListBox1.Items.Add("ComboDropDown event fired");
    }
    
    private void fpSpread1_ComboSelChange(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
    {
         ListBox1.Items.Add("ComboSelChange event fired");
    }
    Dim cb As New FarPoint.Win.Spread.CellType.ComboBoxCellType()
    FpSpread1.ActiveSheet.Cells(0, 0).CellType = cb
    
    Private Sub FpSpread1_ComboCloseUp(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles FpSpread1.ComboCloseUp
         ListBox1.Items.Add("ComboCloseUp event fired")
    End Sub
    
    Private Sub FpSpread1_ComboDropDown(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles
    FpSpread1.ComboDropDown
         ListBox1.Items.Add("ComboDropDown event fired")
    End Sub
    
    Private Sub FpSpread1_ComboSelChange(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles
    FpSpread1.ComboSelChange
         ListBox1.Items.Add("ComboSelChange event fired")
    End Sub
    
    See Also