c# - How can I remove the border padding on container controls in WinForms? -


i set margin , padding 0 0 0 0 doesn't have effect tabcontrols. look:

enter image description here

here talking about. want stick borders together.

how can this?

@henk holterman - yes, what's wrong ?

there's comment left in source code tabpage exasperated microsoft programmer (edited fit page):

//hack: ensure tabpage draws correctly (the border  //  clipped , gradient fill match correctly tabcontrol). //  unfortunately, there no way determine padding used  //  on tabpage. //  use following below, getmargins busted  //  in theming api: //visualstylerenderer visualstylerenderer = new visualstylerenderer(visualstyleelement.tab.pane.normal); //padding themepadding = visualstylerenderer.getmargins(e.graphics, marginproperty.contentmargins); 

visual styles have been major bug factory, particularly tabcontrol. check this answer way selectively turn off tabcontrol you'll behavior used to. of course does change appearance.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -