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.
ADAdministrator Syncfusion Team March 15, 2004 02:59 PM
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.
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.