private bool isColHeader = false;
private bool isRowHeader = false;
private void fpSpread1_CellClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
{
// ヘッダがクリックされたかどうかを判別
isColHeader = e.ColumnHeader;
isRowHeader = e.RowHeader;
}
private void fpSpread1_EnterCell(object sender, FarPoint.Win.Spread.EnterCellEventArgs e)
{
// ヘッダのクリックによるセル移動を除外
if (!isColHeader && !isRowHeader)
{
Console.WriteLine("EnterCell");
}
}
Private isColHeader As Boolean = False
Private isRowHeader As Boolean = False
Private Sub FpSpread1_CellClick(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs) Handles FpSpread1.CellClick
' ヘッダがクリックされたかどうかを判別
isColHeader = e.ColumnHeader
isRowHeader = e.RowHeader
End Sub
Private Sub FpSpread1_EnterCell(ByVal sender As System.Object, ByVal e As FarPoint.Win.Spread.EnterCellEventArgs) Handles FpSpread1.EnterCell
' ヘッダのクリックによるセル移動を除外
If Not (isColHeader) And Not (isRowHeader) Then
Console.WriteLine("EnterCell")
End If
End Sub