有没有人知道如何避免TabControl和TabControl页面之间的左右间隔(每个间隔大约5-10像素)。我什么都试过了。所有页边距和填充都为零。
发布于 2012-06-25 08:01:21
一位恼火的微软程序员在TabPage的源代码中留下了一条评论:
//HACK: to ensure that the tabpage draws correctly (the border will get clipped and
// and gradient fill will match correctly with the tabcontrol). Unfortunately, there is no good way to determine
// the padding used on the tabpage.
// I would like to use the following below, but GetMargins is busted in the theming API:
//VisualStyleRenderer visualStyleRenderer = new VisualStyleRenderer(VisualStyleElement.Tab.Pane.Normal);
//Padding themePadding = visualStyleRenderer.GetMargins(e.Graphics, MarginProperty.ContentMargins);致谢: Hans Passant :-)
https://stackoverflow.com/questions/11178739
复制相似问题