예제 #1
0
        private void AddTabToUi(ToolboxTab tab)
        {
            SuspendLayout();
            pnlMain.SuspendLayout();
            tab.Dock = DockStyle.Top;

            tab.ButtonClick           += new ToolboxButtonEventHandler(OnButtonClick);
            tab.ButtonDoubleClick     += new ToolboxButtonEventHandler(OnButtonDoubleClick);
            tab.SelectedButtonChanged += new ToolboxButtonEventHandler(OnSelectedButtonChanged);

            tab.CollapsedChanged += new EventHandler(OnCollapsedChanged);

            pnlMain.Controls.Add(tab);

            if (tab.Collapsed)
            {
                tab.OpenTab();
            }
            else
            {
                selectedTab = tab;
            }

            pnlMain.ResumeLayout();
            ResumeLayout();
        }
예제 #2
0
        private void AddTabToUi(ToolboxTab tab)
        {
            SuspendLayout();
            pnlMain.SuspendLayout();
            tab.Dock = DockStyle.Top;

            tab.ButtonClick += new ToolboxButtonEventHandler(OnButtonClick);
            tab.ButtonDoubleClick += new ToolboxButtonEventHandler(OnButtonDoubleClick);
            tab.SelectedButtonChanged += new ToolboxButtonEventHandler(OnSelectedButtonChanged);

            tab.CollapsedChanged += new EventHandler(OnCollapsedChanged);
            
            pnlMain.Controls.Add(tab);

            if (tab.Collapsed) tab.OpenTab(); else selectedTab = tab;

            pnlMain.ResumeLayout();
            ResumeLayout();
        }