Public Class ColorAction
Inherits FarPoint.Win.Spread.Action
Public Overrides Sub PerformAction(ByVal sender As Object)
If TypeOf sender Is FarPoint.Win.Spread.SpreadView Then
Dim spread As FarPoint.Win.Spread.SpreadView = CType(sender, FarPoint.Win.Spread.SpreadView)
Dim sheet As FarPoint.Win.Spread.SheetView = spread.Sheets(spread.ActiveSheetIndex)
sheet.Cells(sheet.ActiveRowIndex, sheet.ActiveColumnIndex).BackColor = Color.Red
End If
End Sub
End Class
Dim im As FarPoint.Win.Spread.InputMap = fpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)
Dim am As FarPoint.Win.Spread.ActionMap = fpSpread1.GetActionMap()
im.Put(New FarPoint.Win.Spread.Keystroke(Keys.OemMinus, Keys.None), "ColorAction")
am.Put("ColorAction", New ColorAction)