protected override void OnRenderItemCheck(System.Windows.Forms.ToolStripItemImageRenderEventArgs e) { base.OnRenderItemCheck(e); System.Drawing.Bitmap imagem = new System.Drawing.Bitmap(Properties.Resources.Check); //e.Graphics.DrawImage(imagem, new Rectangle(e.CellBounds.X + e.CellBounds.Width - imagem.Width - StyleSettings.DeslocaImagem_Botao, e.CellBounds.Y + StyleSettings.DeslocaImagem_Botao, imagem.Width, imagem.Height)); if (e.Item.Selected) { var rect = new System.Drawing.Rectangle(3, 1, 20, 20); var rect2 = new System.Drawing.Rectangle(4, 2, 18, 18); System.Drawing.SolidBrush b = new System.Drawing.SolidBrush(StyleSettings.Form_BackGround_Color); System.Drawing.SolidBrush b2 = new System.Drawing.SolidBrush(StyleSettings.Button_BackGround_Color_Start); e.Graphics.FillRectangle(b, rect); e.Graphics.FillRectangle(b2, rect2); //e.Graphics.DrawImage(e.Image, new Point(5, 3)); e.Graphics.Clear(System.Drawing.Color.Black); e.Graphics.DrawImage(imagem, new System.Drawing.Point(5, 3)); } else { var rect = new System.Drawing.Rectangle(3, 1, 20, 20); var rect2 = new System.Drawing.Rectangle(4, 2, 18, 18); System.Drawing.SolidBrush b = new System.Drawing.SolidBrush(System.Drawing.Color.White); System.Drawing.SolidBrush b2 = new System.Drawing.SolidBrush(System.Drawing.Color.Silver); e.Graphics.FillRectangle(b, rect); e.Graphics.FillRectangle(b2, rect2); //e.Graphics.DrawImage(e.Image, new Point(5, 3)); e.Graphics.Clear(System.Drawing.Color.Black); e.Graphics.DrawImage(imagem, new System.Drawing.Point(5, 3)); } }
public void DrawItemCheck(System.Windows.Forms.ToolStripItemImageRenderEventArgs e) { }