MESCIUS SPREAD for Windows Forms 15.0J
ResetCellType メソッド (AlternatingRow)
使用例 

この行のセル型をリセットし、デフォルト行からセル型を継承します。
構文
'宣言
 
Public Sub ResetCellType() 
public void ResetCellType()
使用例
次のサンプルコードでは、このメソッド(およびその他のリセットメソッド)を使用して、交互行プロパティをリセットしています。
fpSpread1.ActiveSheet.AlternatingRows[0].BackColor = Color.LightBlue;
fpSpread1.ActiveSheet.AlternatingRows[0].Border = new FarPoint.Win.LineBorder(Color.DarkBlue);
fpSpread1.ActiveSheet.AlternatingRows[0].CellType = new FarPoint.Win.Spread.CellType.GeneralCellType();
fpSpread1.ActiveSheet.AlternatingRows[0].Font = new Font("Comic Sans MS", 10);
fpSpread1.ActiveSheet.AlternatingRows[0].ForeColor = Color.Red;
fpSpread1.ActiveSheet.AlternatingRows[0].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
fpSpread1.ActiveSheet.AlternatingRows[0].Locked = false;
fpSpread1.ActiveSheet.AlternatingRows[0].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top

private void button1Click(object sender, System.EventArgs e)
{
     DialogResult dlg = new DialogResult();
     dlg = MessageBox.Show("Reset the AlternatingRow??", "Reset", MessageBoxButtons.OKCancel);
     if (dlg == DialogResult.OK)
     {
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetBackColor();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetBorder();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetCellType();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetFont();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetForeColor();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetHorizontalAlignment();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetLocked();
          fpSpread1.ActiveSheet.AlternatingRows[0].ResetVerticalAlignment();
     }
}
fpSpread1.ActiveSheet.AlternatingRows(0).BackColor = Color.LightBlue
fpSpread1.ActiveSheet.AlternatingRows(0).Border = New FarPoint.Win.LineBorder(Color.DarkBlue)
fpSpread1.ActiveSheet.AlternatingRows(0).CellType = New FarPoint.Win.Spread.CellType.GeneralCellType
fpSpread1.ActiveSheet.AlternatingRows(0).Font = New Font("Comic Sans MS", 10)
fpSpread1.ActiveSheet.AlternatingRows(0).ForeColor = Color.Red
fpSpread1.ActiveSheet.AlternatingRows(0).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right
fpSpread1.ActiveSheet.AlternatingRows(0).Locked = False
fpSpread1.ActiveSheet.AlternatingRows(0).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Top

Private Sub Button1Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
     Dim dlg As New DialogResult
     dlg = MessageBox.Show("Reset the AlternatingRow??", "Reset", MessageBoxButtons.OKCancel)
     If dlg = DialogResult.OK Then
          fpSpread1.ActiveSheet.AlternatingRows(0).ResetBackColor()
          fpSpread1.ActiveSheet.AlternatingRows(0).ResetBorder()
          fpSpread1.ActiveSheet.AlternatingRows(0).ResetCellType()
          fpSpread1.ActiveSheet.AlternatingRows(0).ResetFont()
          fpSpread1.ActiveSheet.AlternatingRows(0).ResetForeColor()
          fpSpread1.ActiveSheet.AlternatingRows(0).ResetHorizontalAlignment()
          fpSpread1.ActiveSheet.AlternatingRows(0).ResetLocked()
          fpSpread1.ActiveSheet.AlternatingRows(0).ResetVerticalAlignment()
     End If
End Sub
参照

AlternatingRow クラス
AlternatingRow メンバ

 

 


© MESCIUS inc. All rights reserved.