PowerTools SPREAD for Windows Forms 8.0J
EditBaseCellType コンストラクタ(EditBaseCellType)


コピー元の基本セル型
指定されたEditBaseCellTypeからプロパティをコピーします(コピーコンストラクタ)。
構文
'Declaration
 
Public Function New( _
   ByVal g As EditBaseCellType _
)
'使用法
 
Dim g As EditBaseCellType
 
Dim instance As New EditBaseCellType(g)
public EditBaseCellType( 
   EditBaseCellType g
)

パラメータ

g
コピー元の基本セル型
次のサンプルコードは、オブジェクトのサブクラスに基づいて新しいEditBaseCellTypeを作成します。
public class eb : FarPoint.Win.Spread.CellType.EditBaseCellType
{

public eb()
{
}

public new FarPoint.Win.SuperEdit.AcceptsArrowKeys AcceptsArrowKeys
{
   get
   {
      return base.AcceptsArrowKeys;
   }
   set
   {
      base.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.None;
   }
}
public new FarPoint.Win.Picture BackgroundImage
{
   get
   {
      return base.BackgroundImage;
   }
   set
   {
      base.BackgroundImage = new FarPoint.Win.Picture(Image.FromFile(Application.StartupPath + "\\Trffc14.ico"));
   }
}
}

eb ed = new eb();
ed.BackgroundImage = null;
ed.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.None;
FarPoint.Win.Spread.CellType.EditBaseCellType editor = new FarPoint.Win.Spread.CellType.EditBaseCellType(ed);
fpSpread1.ActiveSheet.Cells[0, 0].CellType = editor;
label1.Text = "The first cell is based on a subclassed EditBaseCellType.  Type something in the first cell and try "+
"to use the arrow keys.  They won't navigate in the cell.";
Public Class eb
Inherits FarPoint.Win.Spread.CellType.EditBaseCellType

Public Sub eb()

End Sub

Public Shadows Property AcceptsArrowKeys() As FarPoint.Win.SuperEdit.AcceptsArrowKeys
   Get
   Return MyBase.AcceptsArrowKeys
   End Get
   Set(ByVal Value As FarPoint.Win.SuperEdit.AcceptsArrowKeys)
   MyBase.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.None
   End Set
End Property

Public Shadows Property BackgroundImage() As FarPoint.Win.Picture
   Get
   Return MyBase.BackgroundImage
   End Get
   Set(ByVal Value As FarPoint.Win.Picture)
   MyBase.BackgroundImage = New FarPoint.Win.Picture(Image.FromFile(Application.StartupPath & "\Trffc14.ico"))
   End Set
End Property

End Class

Dim ed As New eb()
ed.BackgroundImage = Nothing
ed.AcceptsArrowKeys = Nothing
Dim editor As New FarPoint.Win.Spread.CellType.EditBaseCellType(ed)
FpSpread1.ActiveSheet.Cells(0, 0).CellType = editor
参照

EditBaseCellType クラス
EditBaseCellType メンバ
オーバーロード一覧

 

 


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