We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the index of the Tabbed window programmatically in DockingManager

Platform: WinForms |
Control: DockingManager |
.NET Framework: 4

By default, newly added Tabbed Dock Windows will be arranged at right side of the existing tab in DockingManager. We can change the order of the Tabbed Dock window in DockingManager by insert the new tab or desired tab in the desired index of TabControlAdv. TabControlAdv is used to arrange the Tabbed dock windows in DockingManager. The following code explains how to add new tabbed window into left side of the existing tab,



        void AddChildToDockingManager(int i)
            for(int j = 1; j<=i;j++)
                Panel panel = GetPanel(j);
                this.dockingManager1.DockControl(panel, pan, DockingStyle.Tabbed, 20);
                DockTabControl docktab;
                DockHost dhost = panel.Parent as DockHost;
                if (dhost != null)
                    DockHostController dhc = dhost.InternalController as DockHostController;
                    if (dhc != null && dhc.ParentController is DockTabController)
                        docktab = (dhc.ParentController as DockTabController).TabControl;
                        TabPageAdv page = docktab.TabPages[0];
                        docktab.TabPages.Insert(docktab.TabPages.Count, page);
                        docktab.SelectedIndex = 0;
        Panel GetPanel(int i)
            Panel panel = new Panel();
            panel.Name = "Panel" + i;
            CaptionButtonsCollection ccbpanel = new Syncfusion.Windows.Forms.Tools.CaptionButtonsCollection();
            this.dockingManager1.SetDockLabel(panel, "Dock Panel" +i);
            this.dockingManager1.SetEnableDocking(panel, true);
            ccbpanel.MergeWith(this.dockingManager1.CaptionButtons, false);
            this.dockingManager1.SetCustomCaptionButtons(panel, ccbpanel);
            return panel;



The following screenshot shows the default order of the Tabbed window,

Showing the default order of the Tabbed window


The following screenshot shows the new order of the tabbed window,

Showing the new order of the Tabbed window



VB: http://www.syncfusion.com/downloads/support/directtrac/general/ze/DockingManager_TabOrder_VB-85551568.zip

C#: http://www.syncfusion.com/downloads/support/directtrac/general/ze/DockingManager_TabOrder_CSharp-212050801.zip


2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile