private void Form1_Load(object sender, EventArgs e)
{
// 行/列の移動を許可します
fpSpread1.AllowRowMove = true;
fpSpread1.AllowColumnMove = true;
// 列数を5にします
fpSpread1.ActiveSheet.ColumnCount = 5;
fpSpread1.ActiveSheet.Rows[0].CellType = new FarPoint.Win.Spread.CellType.TextCellType();
fpSpread1.ActiveSheet.SetText(0, 0, "1列目");
fpSpread1.ActiveSheet.SetText(0, 1, "2列目");
fpSpread1.ActiveSheet.SetText(0, 2, "3列目");
fpSpread1.ActiveSheet.SetText(0, 3, "4列目");
fpSpread1.ActiveSheet.SetText(0, 4, "5列目");
}
private void button1_Click(object sender, EventArgs e)
{
// 複数行/複数列の移動を禁止します
fpSpread1.AllowRowMoveMultiple = false;
fpSpread1.AllowColumnMoveMultiple = false;
}
private void button2_Click(object sender, EventArgs e)
{
// 複数行/複数列の移動を許可します
fpSpread1.AllowRowMoveMultiple = true;
fpSpread1.AllowColumnMoveMultiple = true;
}
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
' 行/列の移動を許可します
FpSpread1.AllowRowMove = True
FpSpread1.AllowColumnMove = True
' 列数を5にします
FpSpread1.ActiveSheet.ColumnCount = 5
FpSpread1.ActiveSheet.Rows(0).CellType = New FarPoint.Win.Spread.CellType.TextCellType
FpSpread1.ActiveSheet.SetText(0, 0, "1列目")
FpSpread1.ActiveSheet.SetText(0, 1, "2列目")
FpSpread1.ActiveSheet.SetText(0, 2, "3列目")
FpSpread1.ActiveSheet.SetText(0, 3, "4列目")
FpSpread1.ActiveSheet.SetText(0, 4, "5列目")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' 複数行/複数列の移動を禁止します
FpSpread1.AllowRowMoveMultiple = False
FpSpread1.AllowColumnMoveMultiple = False
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
' 複数行/複数列の移動を許可します
FpSpread1.AllowRowMoveMultiple = True
FpSpread1.AllowColumnMoveMultiple = True
End Sub