Change the Tab size of tabControl
<p>I redraw the graphics of the <code>Tab</code> for the <code>TabControl</code> but I can't set the <code>Width</code> of it.</p>

<p>What I want is that the text of the <code>Tab</code> and the icon is contained in its size.</p>

<p>Now is something like this:</p>

<p><a href="https://i.stack.imgur.com/RQQjG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/RQQjG.png" alt="tabs are overlaid"></a></p>

<p>My Code</p>

<pre><code>private void tabControlForm_DrawItem(object sender, DrawItemEventArgs e)
{

   try
   {
       using (Brush br = new SolidBrush(TabColors[tabControlForm.TabPages[e.Index]]))
       {
           Rectangle rect = e.Bounds;

           rect.Width += 10;

           e.Graphics.FillRectangle(br, rect);
           SizeF sz = e.Graphics.MeasureString(tabControlForm.TabPages[e.Index].Text, e.Font);
           e.Graphics.DrawString(tabControlForm.TabPages[e.Index].Text, e.Font, Brushes.Black, rect.Left + (rect.Width - sz.Width) / 2, rect.Top + (rect.Height - sz.Height) / 2 + 1);

           using (var src = new Bitmap(System.Reflection.Assembly.GetEntryAssembly().GetManifestResourceStream("Castor.Gestionale.images.close-button.png")))
           {
              e.Graphics.DrawImage(src, rect.Right - 18, rect.Top + 10);
           }

           e.Graphics.DrawRectangle(Pens.DarkGray, rect);
           e.DrawFocusRectangle();
       }
   }
   catch {}
}
</code></pre>

<p>Thanks</p>