下面的这段代码可以向左上角的单元格中添加文本。效果图如下:
[Visual Basic .NET Code]
Public Class SheetCorner
Inherits FarPoint.Win.Spread.CellType.GeneralCellType
Public Overrides Sub PaintCell(ByVal g As System.Drawing.Graphics, ByVal r As System.Drawing.Rectangle, ByVal appearance As FarPoint.Win.Spread.Appearance, ByVal value As Object, ByVal isSelected As Boolean, ByVal isLocked As Boolean, ByVal zoomFactor As Single)
MyBase.PaintCell(g, r, appearance, "Text", isSelected, isLocked, zoomFactor)
End Sub
End Class
Dim sctextcell As New SheetCorner()
FpSpread1.Sheets(0).SheetCornerStyle.CellType = sctextcell
[C# Code]
class CornerCell : FarPoint.Win.Spread.CellType.GeneralCellType
{
public override void PaintCell(Graphics g, Rectangle r, FarPoint.Win.Spread.Appearance appearance, object value, bool isSelected, bool isLocked, float zoomFactor)
{
base.PaintCell(g, r, appearance, "Text", isSelected, isLocked, zoomFactor);
}
}
CornerCell sctextcell = new CornerCell();
fpSpread1.Sheets[0].SheetCornerStyle.CellType = sctextcell;
Spread向左上角的单元格添加文本
热推产品
- ActiveReport... 强大的.NET报表设计、浏览、打印、转换控件,可以同时用于WindowsForms谀坔攀戀Forms平台下......
- AnyChart AnyChart使你可以创建出绚丽的交互式的Flash和HTML5的图表和仪表控件。可以用于仪表盘的创......
推荐产品