回复 3楼wangmj的帖子
可以显示文字,颜色代码如下:
- public class CCheckBoxCellType : 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)
- {
- g.FillRectangle(new SolidBrush(Color.White), r);
- Rectangle r1 = new Rectangle(r.X, r.Y, 20, r.Height);
- Rectangle r2 = new Rectangle(r.X + r.Width / 2, r.Y, r.Width / 2, r.Height);
- ControlPaint.DrawCheckBox(g, r1, ButtonState.Checked);
- g.DrawString("测试", appearance.Font, new SolidBrush(Color.Black), new PointF(r1.X + r1.Width, r1.Y));
- ControlPaint.DrawCheckBox(g, r2, ButtonState.Normal);
- //base.PaintCell(g, r, appearance, value, isSelected, isLocked, zoomFactor);
- }
- }
复制代码 |