下面的代码是绘制tabControl控件选项卡第一项的字体,颜色,居中对齐等;我想请问怎么绘制tabControl控件选项卡第一项的背景颜色,边框等等呢?请高手指教一下 小弟万分感谢。向帮助我们这些菜鸟的高手致敬;private RectangleF tabTextArea;
tabTextArea = (RectangleF)tabControl1.GetTabRect(0);private void tabControl1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
{

Graphics g = e.Graphics;
Font font = new Font("宋体",9F);
StringFormat drawFormat = new StringFormat();
drawFormat.Alignment = StringAlignment.Center;
drawFormat.LineAlignment = StringAlignment.Center;
SolidBrush brush = new SolidBrush(Color.Red);
g.DrawString("我爱你", font, brush, tabTextArea,drawFormat);
}