using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Text; using System.Drawing; using System.Windows.Forms; /** 隐藏tabcontrol标签 * Apperarance 属性:Faltbuttons * SizeMode属性:Fixed * 各个TabPage的Text :空 * ItemSize : Width=0;Height=1 **/ namespace Mesnac.Controls.Default { [ToolboxBitmap(typeof(System.Windows.Forms.TabControl))] public partial class MCTabControl : TabControl { #region 字段定义 private int _currentTabIndex = 0; //当前选项卡索引 private string _currentTabIndexName = String.Empty; //当前选项卡索引动画属性 #endregion #region 构造方法 public MCTabControl() { InitializeComponent(); } public MCTabControl(IContainer container) { container.Add(this); InitializeComponent(); } #endregion #region 属性定义 /// /// 当前选项卡索引 /// public int CurrentTabIndex { get { return _currentTabIndex; } set { _currentTabIndex = value; if (_currentTabIndex < this.TabPages.Count) { this.SelectedIndex = this._currentTabIndex; } } } #endregion #region 动画属性 /// /// 当前 /// public string CurrentTabIndexName { get { return _currentTabIndexName; } set { _currentTabIndexName = value; } } #endregion } }