Spread Windows Forms 6.0 Product Documentation
ComboCloseUp Event
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : ComboCloseUp Event


Glossary Item Box

Occurs when the user closes a combo box in a cell.

Syntax

Visual Basic (Declaration) 
Public Event ComboCloseUp As EditorNotifyEventHandler
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim handler As EditorNotifyEventHandler
 
AddHandler instance.ComboCloseUp, handler
C# 
public event EditorNotifyEventHandler ComboCloseUp

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
Column Gets the column index of the cell with the editor that raised the event.
EditingControl Gets the Control object that raises the event.
Row Gets the row index of the cell with the editor that raised the event.
View Gets the view that contains the cell with the editor that raised the event.

Remarks

This event is raised by the OnComboCloseUp method when the list portion of the combo box cell closes (after the user selects an item from the combo box list).

You can use this event to make changes to a list (such as adding or removing items) after the user has selected an item. This event is raised after the ComboSelChange 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.
C#Copy Code
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");
}
Visual BasicCopy Code
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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.