PowerTools SPREAD for ASP.NET 8.0J
PaintCell メソッド (ButtonCellType)

指定した外観、マージン、および値に基づいて、コントロールを取得し、セルに描画します。
オーバーロード一覧
オーバーロード説明
PaintCell(String,TableCell,Appearance,Inset,Object,Boolean)指定した外観、マージン、および値に基づいて、コントロールを取得し、セルに描画します。  
PaintCell(PdfGraphics,RectangleF,Appearance,Object,Boolean,Boolean,Single)コントロールを取得し、指定した外観と選択範囲に基づいてセルをPDFに印刷します。  
この例では、ButtonCellTypeをサブクラス化し、スプレッドシートの先頭セル内にコマンドボタン型セルを作成します。
private void Page_Load(object sender, System.EventArgs e)
{
	btnTypemybtn = new btnType();
	FpSpread1.ActiveSheetView.Cells[0, 0].CellType = mybtn;
}

[Serializable()]
class btnType : FarPoint.Web.Spread.ButtonCellType
{
	public override Control GetEditorControl(string id, TableCell parent, FarPoint.Web.Spread.Appearance style, FarPoint.Web.Spread.Inset margin, object v, bool ul)
	{
		return base.GetEditorControl(id, parent, style, margin, v, ul);
	}

	public override ControlPaintCell(string id, TableCell parent, FarPoint.Web.Spread.Appearance style, FarPoint.Web.Spread.Inset margin, object v, bool ul)
	{
		return base.PaintCell(id, parent, style, margin, v, ul);
	}
}
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
	Dim mybtn As New btnType()
	FpSpread1.ActiveSheetView.Cells(0, 0).CellType = mybtn
End Sub

<Serializable()> _
Public Class btnType
	Inherits FarPoint.Web.Spread.ButtonCellType

	Public Overrides Function GetEditorControl(ByVal id As String, ByVal parent As TableCell, ByVal style As FarPoint.Web.Spread.Appearance, ByVal margin As FarPoint.Web.Spread.Inset, ByVal val As Object, ByVal ul As Boolean) As System.Web.UI.Control
		Return MyBase.GetEditorControl(id, parent, style, margin, val, ul)
	End Function

	Public Overrides FunctionPaintCell(ByVal id As String, ByVal parent As TableCell, ByVal style As FarPoint.Web.Spread.Appearance, ByVal margin As FarPoint.Web.Spread.Inset, ByVal val As Object, ByVal ul As Boolean) As System.Web.UI.Control
		Return MyBase.PaintCell(id, parent, style, margin, val, ul)
	End Function
End Class
参照

ButtonCellType クラス
ButtonCellType メンバ

 

 


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