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.

How to get rid of white border in OneNote style tab

Thread ID:

Created:

Updated:

Platform:

Replies:

11696 Mar 12,2004 04:34 PM Mar 15,2004 02:59 PM Windows Forms 1
loading
Tags: Tools
simon
Asked On March 12, 2004 04:34 PM

I love the OneNote style tab but i want a grey background on the tab and there is a white border I cannot get rid of. I need to enable themes for the tab control to get the tab itself to display correctly (to have a border all the way around and have the tap display nicely) but as soon as I do this there is a white border around it. The white border isnt even uniform all the way around :( I''ve obviously tried BackColor but it is ignored when themes are enabled. Is there a workaround, perhaps custom rendering something - even if i have to subclass the onenote style tab. thanks -simon

Administrator [Syncfusion]
Replied On March 15, 2004 02:59 PM

Hi Simon, The OneNoteTabRenderer TabStyle is modelled on the MS OneNote tabs and hence have a white border along the edges. In order to get rid of this you would have to handle the TabControlAdv''s DrawItem event as shown in the code below : private void tabControlAdv1_DrawItem(object sender, Syncfusion.Windows.Forms.Tools.DrawTabEventArgs drawItemInfo) { // Draw the default background and interior in all cases. drawItemInfo.DrawBackground(); drawItemInfo.DrawInterior(); CustomDrawBorders(); } Within this event handler you could draw the background and interior using the default methods, but would have to code a custom method for drawing the borders (CustomDrawBorders method). This could be done as shown in the DrawBorders method in the TabRenderer class. When the TabControlAdv is themed, the drawing responsibility is delegated to the OS and hence none of the custom settings have any effect. The control will always be drawn using OS themes ignoring the user''s settings. Please let me know if you need any other information. Regards, Guru Patwal Syncfusion, Inc.

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.

;