コード例 #1
0
            public virtual void OnPaint(PaintEventArgs e, Color backColor, Color foreColor, Font font, bool hover, bool pressed)
            {
                DrawItemBackground(e, hover, pressed);

                if (Image != null)
                {
                    if (Enabled && this.Enabled)
                    {
                        PaintHelper.DrawImageInRange(e.Graphics, Image, Bounds);
                    }
                    else
                    {
                        PaintHelper.DrawImageDisabledInRect(e.Graphics, Image, Bounds, backColor);
                    }
                }
            }