首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何消除TabControl上的差距?

如何消除TabControl上的差距?
EN

Stack Overflow用户
提问于 2012-06-24 23:38:06
回答 1查看 812关注 0票数 0

有没有人知道如何避免TabControl和TabControl页面之间的左右间隔(每个间隔大约5-10像素)。我什么都试过了。所有页边距和填充都为零。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-06-25 08:01:21

一位恼火的微软程序员在TabPage的源代码中留下了一条评论:

代码语言:javascript
复制
    //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 :-)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11178739

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档