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

指定した外観、マージン、および値に基づいて、コントロールを取得し、セルに描画します。
オーバーロード一覧
オーバーロード説明
PaintCell(String,TableCell,Appearance,Inset,Object,Boolean)指定した外観、マージン、および値に基づいて、コントロールを取得し、セルに描画します。  
PaintCell(PdfGraphics,RectangleF,Appearance,Object,Boolean,Boolean,Single)コントロールを取得し、指定した外観と選択範囲に基づいてセルをPDFに印刷します。  
この例では、GeneralCellTypeクラスをサブクラス化し、それをスプレッドシートの先頭セルに使用します。
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim gencell As New generic
    FpSpread1.ActiveSheetView.Cells(0, 0).CellType = gencell
    FpSpread1.ActiveSheetView.SetCellValue(0, 0, "This is a test to see if the text wraps in the cell")
    FpSpread1.ActiveSheetView.Rows(0).Height = 180
End Sub

<Serializable()> _
Public Class generic
    Inherits FarPoint.Web.Spread.GeneralCellType

    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 Function PaintCell(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
private void Page_Load(object sender, System.EventArgse)
{
    gentype gencell = new gentype();
    FpSpread1.ActiveSheetView.Cells[0, 0].CellType = gencell;
    FpSpread1.ActiveSheetView.SetCellValue(0, 0, "This is a test to see if the text wraps in the cell");
    FpSpread1.ActiveSheetView.Rows[0].Height = 180;
}

[Serializable()]
class gentype : FarPoint.Web.Spread.GeneralCellType
{
    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 Control 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);
    }
}
参照

GeneralCellType クラス
GeneralCellType メンバ

 

 


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