Пример #1
0
        protected override void DrawCell(Graphics g)
        {
            Rectangle rect = Bounds;

            rect.Inflate(-2, -2);
            GraphicsToolkit.Draw3DButton(g, rect, isPressed);
        }
Пример #2
0
        public override void OnPaint(CellDrawingContext dc)
        {
            var g = dc.Graphics;

            RGFloat hh = Bounds.Height / 2 - 1;

            Rectangle rect = Bounds;

            Rectangle upRect = new Rectangle(rect.Right - ButtonSize, rect.Top, ButtonSize, hh);

            GraphicsToolkit.Draw3DButton(g.PlatformGraphics, (System.Drawing.Rectangle)upRect, isUpPressed);
            GraphicsToolkit.FillTriangle(g.PlatformGraphics, ArrowSize,
                                         new Point(upRect.Left + ButtonSize / 2 - ArrowSize / 2,
                                                   upRect.Top + hh / 2 + (isUpPressed ? 2 : 1)),
                                         GraphicsToolkit.TriangleDirection.Up);

            Rectangle downRect = new Rectangle(rect.Right - ButtonSize, rect.Top + hh + 1, ButtonSize, hh);

            GraphicsToolkit.Draw3DButton(g.PlatformGraphics, (System.Drawing.Rectangle)downRect, isDownPressed);
            GraphicsToolkit.FillTriangle(g.PlatformGraphics, ArrowSize,
                                         new Point(downRect.Left + ButtonSize / 2 - ArrowSize / 2,
                                                   downRect.Top + hh / 2 - (isDownPressed ? 1 : 2)),
                                         GraphicsToolkit.TriangleDirection.Down);
        }