現在フォーカスがあるSheet上のセルの背景色を変える方法はありますか?

文書番号 : 23060     文書種別 : 使用方法     最終更新日 : 2006/11/08
文書を印刷する
対象製品
El Tabelle Sheet 4.0J
詳細
LeaveCellイベント内で、前のセルの背景色をクリアし次のセルの背景色を設定します。

[Visual Basic]
Private Sub Sheet1_LeaveCell(ByVal sender As Object, ByVal e As GrapeCity.Win.ElTabelle.LeaveCellEventArgs) Handles Sheet1.LeaveCell
  Sheet1.ActiveCell.BackColor = Color.Empty
  Sheet1(e.NewPosition.Column, e.NewPosition.Row).BackColor = Color.Aqua
End Sub

[C#]
private void sheet1_LeaveCell(object sender, LeaveCellEventArgs e)
{
  sheet1.ActiveCell.BackColor = Color.Empty;
  sheet1[e.NewPosition.Column, e.NewPosition.Row].BackColor = Color.Aqua;
}


関連情報

この文書は、以前は次のFAQ IDで公開されていました : 9826