Drawing Gradient Tabs with Rounded Corners

Hello. I'd like to have my advanced tabs look somewhat like the InternetExplorer7 TabStyle theme, but only with different colors. So, I guess that means I would need to draw the tabs myself. I have the code to draw the tabs, but can't figure out how to give them the rounded corner look. Can anyone help me? Here is my code so far:

void tabControlAdv1_DrawItem(object sender, Syncfusion.Windows.Forms.Tools.DrawTabEventArgs drawItemInfo)
{
Brush br = new System.Drawing.Drawing2D.LinearGradientBrush(this.tabControlAdv1.GetTabRect(1), System.Drawing.Color.FromArgb(0, 140, 202), System.Drawing.Color.FromArgb(0, 106, 182), System.Drawing.Drawing2D.LinearGradientMode.Vertical);
drawItemInfo.Graphics.FillRectangle(br, this.tabControlAdv1.GetTabRect(1));
br.Dispose();
drawItemInfo.DrawBackground();
drawItemInfo.DrawBorders();
drawItemInfo.DrawInterior();
}


2 Replies

LA Landon February 7, 2008 07:42 PM UTC

Anyone?



AD Administrator Syncfusion Team March 18, 2008 06:06 AM UTC

Hi Landon,

Thank you for your interest in Syncfusion Products.

To display TabStrips in InternetExplorer7 style, we can use TabRendererIE7 TabStyle. The following code snippet illustrates this:

this.tabControl.TabStyle = typeof(Syncfusion.Windows.Forms.Tools.TabRendererIE7);

Please let me know if any concerns.

Regards,
Fathima


Loader.
Up arrow icon