SPREAD for Windows Forms 8.0J サンプルコード集
ポップアップ電卓の表示を抑制する

ポップアップ電卓(サブエディタ)表示を抑制するには、数値型セルのEnableSubEditorプロパティをFalseにするか、ポップアップ電卓の表示の際に発生するSubEditorOpeningイベントにてその動作をキャンセルします。

 private void Form1_Load(object sender, System.EventArgs e)
 {

  // 数値型セルを定義します
  FarPoint.Win.Spread.CellType.NumberCellType numcell = new FarPoint.Win.Spread.CellType.NumberCellType();
  numcell.EnableSubEditor = false;
  fpSpread1.ActiveSheet.Cells[0, 0].CellType = numcell;

 }

 private void fpSpread1_SubEditorOpening(object sender, FarPoint.Win.Spread.SubEditorOpeningEventArgs e)
 {

  //デフォルト動作(サブエディタ表示)をキャンセルします
  e.Cancel = true;

 }
 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

  '数値型セルを定義します
  Dim numcell As New FarPoint.Win.Spread.CellType.NumberCellType()
  numcell.EnableSubEditor = False
  FpSpread1.ActiveSheet.Cells(0, 0).CellType = numcell

 End Sub

 Private Sub FpSpread1_SubEditorOpening(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.SubEditorOpeningEventArgs) Handles FpSpread1.SubEditorOpening

  'デフォルト動作(サブエディタ表示)をキャンセルします
  e.Cancel = True

 End Sub

 

 


© 2004-2015, GrapeCity inc. All rights reserved.