public class MyCellType : FarPoint.Win.Spread.CellType.TextCellType
{
public override void PaintCell(Graphics g, Rectangle r, FarPoint.Win.Spread.Appearance appearance, object value, bool isSelected, bool isLocked, float zoomFactor)
{
if (value == null)
{
value = "0";
}
base.PaintCell(g, r, appearance, value, isSelected, isLocked, zoomFactor);
}
}
使用:fpspread.activesheet.cell(*,*).value方法获取value == null是自动设置成“0”的单元格时,其值为空。 |
|