ahljxwy 你好,C# 代码如下:
- class MyButtonCellType : FarPoint.Win.Spread.CellType.ButtonCellType
- {
- public override void PaintCell(System.Drawing.Graphics g, System.Drawing.Rectangle r, FarPoint.Win.Spread.Appearance appearance, object value, bool isSelected, bool isLocked, float zoomFactor)
- {
- Rectangle myr = new Rectangle(r.X + 10, r.Y + 5, 15, 8);
- RectangleF rectf = new RectangleF(r.X, r.Y, r.Width, r.Height);
- Brush b = default(Brush);
- b = new SolidBrush(Color.White);
- g.FillRectangle(b, rectf);
- FarPoint.Win.FpButton.DoPaint(g, myr, base.ButtonColor, base.TextColor, appearance.Font, FarPoint.Win.HorizontalAlignment.Left, FarPoint.Win.VerticalAlignment.Top, false, false, base.Text,
- "", FarPoint.Win.ButtonTextAlign.TextRightPictLeft, FarPoint.Win.TextOrientation.TextHorizontal,false,1, base.DarkColor, base.LightColor, base.Picture, base.PictureDown, false,false);
- }
- }
复制代码 |