Пример #1
0
        /// <summary>
        /// Initializes a new instance of the TabEntry class.
        /// </summary>
        /// <param name="tabControl">The tab page control.</param>
        public TabEntry(TabLightweightControl tabLightweightControl, TabPageControl tabPageControl)
        {
            //	Set the the tab control and the tab lightweight control.
            this.tabPageControl         = tabPageControl;
            this.tabPageControl.TabStop = false;
            this.tabLightweightControl  = tabLightweightControl;

            //	Instantiate the tab selector lightweight control.
            tabSelectorLightweightControl = new TabSelectorLightweightControl(this);
        }
        /// <summary>
        /// Sets a tab control.
        /// </summary>
        /// <param name="index">The tab index to set.</param>
        /// <param name="tabPageControl">The tab page control to set.</param>
        public void SetTab(int tabNumber, TabPageControl tabPageControl)
        {
            //	If there already is a tab entry for the specified tab number, remove it.
            RemoveTabEntry(tabNumber);

            //	Instantiate the new tab entry.
            TabEntry tabEntry = new TabEntry(this, tabPageControl);

            tabEntryList.Add(tabNumber, tabEntry);
            tabPageContainerControl.Controls.Add(tabEntry.TabPageControl);
            LightweightControls.Add(tabEntry.TabSelectorLightweightControl);
            tabEntry.TabSelectorLightweightControl.DragInside += new DragEventHandler(TabSelectorLightweightControl_DragInside);
            tabEntry.TabSelectorLightweightControl.DragOver   += new DragEventHandler(TabSelectorLightweightControl_DragOver);
            tabEntry.TabSelectorLightweightControl.Selected   += new EventHandler(TabSelectorLightweightControl_Selected);
            tabEntry.TabPageControl.VisibleChanged            += new EventHandler(TabPageControl_VisibleChanged);

            //	Layout and invalidate.
            PerformLayout();
            Invalidate();
        }
        /// <summary>
        /// Sets a tab control.
        /// </summary>
        /// <param name="index">The tab index to set.</param>
        /// <param name="tabPageControl">The tab page control to set.</param>
        public void SetTab(int tabNumber, TabPageControl tabPageControl)
        {
            //	If there already is a tab entry for the specified tab number, remove it.
            RemoveTabEntry(tabNumber);

            //	Instantiate the new tab entry.
            TabEntry tabEntry = new TabEntry(this, tabPageControl);
            tabEntryList.Add(tabNumber, tabEntry);
            tabPageContainerControl.Controls.Add(tabEntry.TabPageControl);
            LightweightControls.Add(tabEntry.TabSelectorLightweightControl);
            tabEntry.TabSelectorLightweightControl.DragInside += new DragEventHandler(TabSelectorLightweightControl_DragInside);
            tabEntry.TabSelectorLightweightControl.DragOver += new DragEventHandler(TabSelectorLightweightControl_DragOver);
            tabEntry.TabSelectorLightweightControl.Selected += new EventHandler(TabSelectorLightweightControl_Selected);
            tabEntry.TabPageControl.VisibleChanged += new EventHandler(TabPageControl_VisibleChanged);

            //	Layout and invalidate.
            PerformLayout();
            Invalidate();
        }
 public TabPageAccessibility(TabPageControl ownerControl) : base(ownerControl)
 {
     _tabpage = ownerControl;
 }
Пример #5
0
        /// <summary>
        /// Initializes a new instance of the TabEntry class.
        /// </summary>
        /// <param name="tabControl">The tab page control.</param>
        public TabEntry(TabLightweightControl tabLightweightControl, TabPageControl tabPageControl)
        {
            //	Set the the tab control and the tab lightweight control.
            this.tabPageControl = tabPageControl;
            this.tabPageControl.TabStop = false;
            this.tabLightweightControl = tabLightweightControl;

            //	Instantiate the tab selector lightweight control.
            tabSelectorLightweightControl = new TabSelectorLightweightControl(this);
        }
Пример #6
0
 public TabPageAccessibility(TabPageControl ownerControl) : base(ownerControl)
 {
     _tabpage = ownerControl;
 }