winform TabControl 添加关闭按钮 Add close button to TabControl TabPages - C#
来源:互联网 发布:网络彩票概念龙头股 编辑:程序博客网 时间:2024/06/05 03:00
<h1 class="articleTitle" style="font-family: 'Open Sans', Tahoma, Arial, Helvetica, sans-serif; margin: 0px 0px 10px; font-size: 22px; text-shadow: rgb(204, 204, 204) 2px 2px 3px; color: rgb(0, 0, 0); padding: 5px 10px; font-weight: normal; text-align: left; width: 590px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">How to Add a Close Button to Tabs in TabControl?</h1>// Create a command button// Set the ImageIndex property to show the second image from the list// Set the Key property to TAB_CLOSE, so we can identify what kind of a button was clickedLidorSystems.IntegralUI.Controls.CommandButton closeButton = new LidorSystems.IntegralUI.Controls.CommandButton();closeButton.ImageIndex = 1;closeButton.Key = "TAB_CLOSE"; // In this demo we are using only one command button// If the button collection is empty, add the close button to itif (this.tabControl1.TabButtons.Count == 0)this.tabControl1.TabButtons.Add(closeButton);
// Check whether there is some tab on top (selected)if (this.tabControl1.SelectedPage != null){// Create a command button// Set the ImageIndex property to show the first image from the list// Set the Key property to TAB_CLOSE, so we can identify what kind of a button was clickedLidorSystems.IntegralUI.Controls.CommandButton closeButton = new LidorSystems.IntegralUI.Controls.CommandButton();closeButton.ImageIndex = 0;closeButton.Key = "TAB_CLOSE"; // In this demo we are using only one command button// If the button collection is empty, add the close button to itif (this.tabControl1.SelectedPage.Buttons.Count == 0)this.tabControl1.SelectedPage.Buttons.Add(closeButton);this.tabControl1.SelectedPage.UseParentButtons = false; // Update the control layout to apply changesthis.tabControl1.UpdateLayout();}
更多信息:
http://www.lidorsystems.com/support/articles/winforms/tabcontrol/tab-close-button.aspx
0 0
- winform TabControl 添加关闭按钮 Add close button to TabControl TabPages - C#
- TabControl添加关闭按钮
- TabControl添加关闭按钮
- Winform -----TabControl 标签 画关闭按钮
- c#重写TabControl控件实现关闭按钮
- winform tabControl隐藏顶部按钮
- c# TabControl 中TabPages放左边显示文字
- VS2012 C# 隐藏/显视 tabControl 中的 TabPages 页
- 【转】c# TabControl 中TabPages放左边显示文字
- C#重绘TabControl的Tabpage标签,添加图片及关闭按钮
- C#重绘TabControl的Tabpage标签,添加图片及关闭按钮
- C#重绘TabControl的Tabpage标签,添加图片及关闭按钮
- C#重绘TabControl的Tabpage标签,添加图片及关闭按钮
- TabControl tab绘制关闭按钮
- 给TabControl的Page添加个关闭按钮
- c#重写TabControl控件实现关闭按钮的方法
- 选项卡带关闭按钮的TabControl
- C# tabcontrol
- ButterKnife8.10的使用详解
- mongoDB的查询与修改
- JQ与Canvas
- 在Android Studio 运行的时候报E/dalvikvm: Could not find class 'xxx',
- 内置对象
- winform TabControl 添加关闭按钮 Add close button to TabControl TabPages - C#
- C#中Split用法(可以用在取小数点之前后之后)
- GitHub 优秀的 Android 开源项目
- java web项目的启动及初始化
- js事件
- iOS开发时间控件怎么强制24小时制
- Nearest Common Ancestors poj 1330 LCA转RMQ
- C#操作注册表
- 支付宝接口开发集成支付环境小结