예제 #1
0
 protected override void OnRenderLabelBackground(System.Windows.Forms.ToolStripItemRenderEventArgs e)
 {
     if (currentRenderer != null)
     {
         currentRenderer.DrawLabelBackground(e);
         return;
     }
     base.OnRenderLabelBackground(e);
 }
예제 #2
0
 protected override void OnRenderLabelBackground(ToolStripItemRenderEventArgs e)
 {
     if (_currentRenderer != null)
     {
         _currentRenderer.DrawLabelBackground(e);
     }
     else
     {
         base.OnRenderLabelBackground(e);
     }
 }
예제 #3
0
 protected override void OnPaint(PaintEventArgs e)
 {
     if (base.Owner != null)
     {
         ToolStripRenderer renderer = base.Renderer;
         renderer.DrawLabelBackground(new ToolStripItemRenderEventArgs(e.Graphics, this));
         if ((this.DisplayStyle & ToolStripItemDisplayStyle.Image) == ToolStripItemDisplayStyle.Image)
         {
             renderer.DrawItemImage(new ToolStripItemImageRenderEventArgs(e.Graphics, this, base.InternalLayout.ImageRectangle));
         }
         this.PaintText(e.Graphics);
     }
 }
예제 #4
0
        /// <summary>
        /// Inheriting classes should override this method to handle this event.
        /// </summary>
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            if (Owner != null)
            {
                ToolStripRenderer renderer = Renderer;

                renderer.DrawLabelBackground(new ToolStripItemRenderEventArgs(e.Graphics, this));

                if ((DisplayStyle & ToolStripItemDisplayStyle.Image) == ToolStripItemDisplayStyle.Image)
                {
                    renderer.DrawItemImage(new ToolStripItemImageRenderEventArgs(e.Graphics, this, InternalLayout.ImageRectangle));
                }
                PaintText(e.Graphics);
            }
        }
예제 #5
0
 protected override void OnRenderLabelBackground(ToolStripItemRenderEventArgs e)
 {
     renderer.DrawLabelBackground(e);
 }