回复 1楼GARYYOU的帖子
应该可以,不过要自定义一个CellType,继承自ComBoxCellType
重写PaintCell函数,这行代码ControlPaint.DrawComboButton用来画Combox的下拉箭头的。
-
- public override void PaintCell(Graphics g, Rectangle r, FarPoint.Win.Spread.Appearance appearance, object value, bool isSelected, bool isLocked, float zoomFactor)
- {
-
- if (value != null)
- {
-
- g.DrawString(value.ToString(), appearance.Font, new SolidBrush(Color.Black), new PointF(r.X + 20, r.Y - 10 + 10));
- ControlPaint.DrawComboButton(g, new Rectangle(r.Right - 17, r.Y, 17, r.Height), ButtonState.Flat);
- }
- else
- {
- base.PaintCell(g, r, appearance, value, isSelected, isLocked, zoomFactor);
- }
- }
复制代码 |