回复 10楼wangmj的帖子
如果想修改非编辑状态下的显示内容,需要重写 PaintCell,以下一段示例代码,请参考并结合你的需要进行实现:
- public override void PaintCell(Graphics g, Rectangle r, FarPoint.Win.Spread.Appearance appearance, object value, bool isSelected, bool isLocked, float zoomFactor)
- {
- Rectangle r1 = new Rectangle(r.X, r.Y, r.Width / 2, r.Height);
- Rectangle r2 = new Rectangle(r.X + r.Width/2, r.Y, r.Width / 2, r.Height);
- ControlPaint.DrawCheckBox(g, r1, ButtonState.Checked);
- ControlPaint.DrawCheckBox(g, r2, ButtonState.Normal);
- //base.PaintCell(g, r, appearance, value, isSelected, isLocked, zoomFactor);
- }
复制代码 |