的确如你所说。我们可以通过继承CellType,然后重写PaintCell方法来绘制您所需要的内容。
- public class ImageHeader : TextCellType
- {
- 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, value, isLocked, isLocked, zoomFactor);
- var rr = new Rectangle(r.X + r.Width - 10, r.Y, 10, r.Height);
- TextureBrush b2 = new TextureBrush(Image.FromFile(@"_QL95_.jpg"));
- g.FillRectangle(b2, rr);
- //g.FillRectangle(new SolidBrush(Color.Red), rr);
- }
- }
复制代码 |