Spread Windows Forms 8.0 Product Documentation
ButtonClicked Event (FpSpread)
Example 


Occurs when the user clicks a button, check box, or hyperlink in a cell.
Syntax
'Declaration
 
Public Event ButtonClicked As EditorNotifyEventHandler
'Usage
 
Dim instance As FpSpread
Dim handler As EditorNotifyEventHandler
 
AddHandler instance.ButtonClicked, handler
public event EditorNotifyEventHandler ButtonClicked
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 OnButtonClicked method when the user clicks a button, check box, or hyperlink in a cell. This includes the following cell types:

This event occurs when primary buttons not secondary buttons (like spin buttons) are pressed.

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

Example
This example raises the ButtonClicked event when the user presses a button cell.
fpSpread1.ActiveSheet.Cells[0, 0].CellType = new FarPoint.Win.Spread.CellType.ButtonCellType();
Label1.Text = "Click on the button in the first cell.";

private void fpSpread1_ButtonClicked(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
{
     ListBox1.Items.Add("ButtonClick event fired!");
}
FpSpread1.ActiveSheet.Cells(0, 0).CellType = New FarPoint.Win.Spread.CellType.ButtonCellType()
Label1.Text = "Click on the button in the first cell."

Private Sub FpSpread1_ButtonClicked(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles
FpSpread1.ButtonClicked
     ListBox1.Items.Add("ButtonClicked event fired!")
End Sub
Requirements

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

See Also

Reference

FpSpread Class
FpSpread Members
EditorNotifyEventArgs Class

User-Task Documentation

Working with Graphical Cell Types
Allowing the Display of Buttons in a Cell

 

 


Copyright © GrapeCity, inc. All rights reserved.