Spread Windows Forms 9.0 Product Documentation
ComboDropDown Event
Example 


Occurs when the user drops down a combo box in a cell.
Syntax
'Declaration
 
Public Event ComboDropDown As EditorNotifyEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As EditorNotifyEventHandler
 
AddHandler instance.ComboDropDown, handler
public event EditorNotifyEventHandler ComboDropDown
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
ColumnGets the column index of the cell with the editor that raised the event.  
EditingControlGets the Control object that raises the event.  
RowGets the row index of the cell with the editor that raised the event.  
ViewGets the view that contains the cell with the editor that raised the event.  
Remarks

This event is raised by the OnComboDropDown method when the user clicks the drop-down arrow or presses the Alt+down arrow keys in a combo box cell and the list portion of the combo box drops to display the list items.

Use this event to handle the display of the drop down list.

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
Requirements

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

See Also

Reference

FpSpread Class
FpSpread Members
ComboCloseUp Event
ComboSelChange Event
EditorNotifyEventArgs Class

User-Task Documentation

Setting a Combo Box Cell

 

 


Copyright © GrapeCity, inc. All rights reserved.