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

how can i make my panels only tabbable ?

Hello,
I'm new to syncfusion and I'm experimenting with the controls.
I'm trying to make panels that are dockable. but the only function I want is that it can be dragged out of the main window and be put back. I don't want that it is able to dock to the right or top etc.. I only want to be able to be tabbed with the other panels.

so far i have tried this.

---------begin of code-----------
using Syncfusion.Windows.Forms.Tools;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WorldLord
{
    public partial class Form1 : RibbonForm
    {
        public Form1()
        {
            InitializeComponent();
            this.EnableAeroTheme = true;
            this.Borders = new System.Windows.Forms.Padding(0);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.dockingManager1.SetEnableDocking(panel1, true);
            this.dockingManager1.SetEnableDocking(panel2, true);
            this.dockingManager1.DockControl(this.panel2, panel1, Syncfusion.Windows.Forms.Tools.DockingStyle.Tabbed, 200);

            this.dockingManager1.SetOuterDockAbility(panel1, Syncfusion.Windows.Forms.Tools.DockAbility.Tabbed);

            panel3.Dock = System.Windows.Forms.DockStyle.Left;
            
        }

    }
}
----------end of code----------

but it does not work. I'm still able to dock panels 1 and 2 to all sides.

so how can I achieve this functionality?

1 Reply

NK Niranjan Kumar Gopalan Syncfusion Team December 23, 2019 07:33 AM

Hi Yente Paternotte, 

Thanks for contacting Syncfusion support. 

Please refer the below table. 

S.No 
Query  
 Solution 
I'm trying to make panels that are dockable. but the only function I want is that it can be dragged out of the main window and be put back. I don't want that it is able to dock to the right or top etc.. I only want to be able to be tabbed with the other panels. 

PreviewDockHints events can be used to enable or disable docking hints and set the DockAbility property value of dock window as per our requirement. Please refer the below code snippet, simple sample and video which reflects the same. 
 
C#: 
private void DockingManager1_PreviewDockHints(object sender, Syncfusion.Windows.Forms.Tools.PreviewDockHintsEventArgs e) 
        { 
            if (e.DraggingSource != panel1 && e.DraggingSource != panel2 && e.DraggingSource != panel3 && e.DraggingSource != panel4 && e.DraggingSource != panel5 && e.DraggingSource != panel6) 
            { 
                e.DockAbility = Syncfusion.Windows.Forms.Tools.DockAbility.None;  
            } 
            else 
            { 
              e.DockAbility = Syncfusion.Windows.Forms.Tools.DockAbility.Tabbed; 
            } 
        } 


 

We have faced issues multiple time  when we try to dock the window to tabbed state as it remains in float state. 
We have logged this issue as defect and the fix will be included in Volume 4 SP1 release which rolls out by end of January 2020. The issue can be noted in the above video . Please let us know if you have any queries and refer the below feedback portal. 


 
Regards, 
Niranjan Kumar 
 


Loader.
Live Chat Icon For mobile
Up arrow icon