Spread Windows Forms 12.0 Product Documentation
EditorFocused Event

FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : EditorFocused Event
Occurs when the editing control gets focus.
Public Event EditorFocused As EditorNotifyEventHandler
Dim instance As FpSpread
Dim handler As EditorNotifyEventHandler
AddHandler instance.EditorFocused, handler
public event EditorNotifyEventHandler EditorFocused
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.

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.  
This example uses the Editorfocused event.
private void fpSpread1_EditorFocused(object sender, FarPoint.Win.Spread.EditorNotifyEventArgs e)
            if (e.Row == 2 & e.Column == 2)
FarPoint.Win.Spread.CellType.GeneralEditor g = default(FarPoint.Win.Spread.CellType.GeneralEditor);
g = (FarPoint.Win.Spread.CellType.GeneralEditor)fpSpread1.EditingControl;
g.SelectionStart = 1;
Private Sub FpSpread1_EditorFocused(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.EditorNotifyEventArgs) Handles
If e.Row = 2 And e.Column = 2 Then
Dim g As GeneralEditor
g = CType(FpSpread1.EditingControl, GeneralEditor)
g.SelectionStart = 1
End If
End Sub
See Also