【问题标题】:How can you add a button to the header of a TabPage?如何在 TabPage 的标题中添加按钮?
【发布时间】:2013-12-12 06:19:47
【问题描述】:

类似于浏览器关闭标签的方式,我想知道您是否可以在 TabPage 的标题中添加一个按钮。

是否会使用自定义的 TabPage 渲染器

我可以在标签本身上添加一个按钮

【问题讨论】:

标签: c# winforms button tabpage


【解决方案1】:

您可以在此处找到示例实现:

  1. A TabControl with tab page closing capability

  2. Implementing Close button in Tab Pages

  3. FireFox-like Tab Control

基本上,您将编写在适当位置绘制按钮的代码(例如,通过重写 OnDrawItem 函数),然后编写更多代码来处理此按钮的点击。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多