We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Drawing Gradient Tabs with Rounded Corners

Thread ID:

Created:

Updated:

Platform:

Replies:

71591 Feb 6,2008 03:32 PM Mar 18,2008 02:06 AM Windows Forms 2
loading
Tags: FAQ
Landon
Asked On February 6, 2008 03:32 PM

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();
}


Landon
Replied On February 7, 2008 02:42 PM

Anyone?


Administrator [Syncfusion]
Replied On March 18, 2008 02:06 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;