Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
790
TabGroup with Single Pane
posted

Hi, I am adding two controls at run time in DockableGroupPane and then adding that in DockManager. I am getting the result as below

Which is correct behavior. BUT when I add only single control the dockmanager does not create a single tab, instead it does not create any tab. Please refer the below image

Can someone please let me know how can I achieve single tab if I add only 1 control and two tabs if I add 2 controls. Below is the code I am using to add

  private void Form1_Load(object sender, EventArgs e)

        {

            SuspendLayout();

      DockableControlPane dcpTreeView =

              new DockableControlPane("tree", "Tree View", this.treeView1);

            DockableControlPane dcpListView =

              new DockableControlPane("list", "List View", this.listView1);

    DockableGroupPane dgpTreeList = new DockableGroupPane();

            dgpTreeList.ChildPaneStyle = ChildPaneStyle.TabGroup;

            dgpTreeList.Panes.Add(dcpTreeView);

            dgpTreeList.Panes.Add(dcpListView);

 

    DockAreaPane dapLeft = new DockAreaPane(DockedLocation.DockedLeft);

             dapLeft.Panes.Add(dgpTreeList);

              this.ultraDockManager1.DockAreas.Add(dapLeft);

 

            ResumeLayout();

        }

Parents
No Data
Reply
  • 53790
    Verified Answer
    posted

    Hi,

    ajayk2k1 said:
    Can someone please let me know how can I achieve single tab if I add only 1 control and two tabs if I add 2 controls

    At that moment we didn`t implement such kind functionality, but maybe one possible way to achieve desired behavior could be if you are using additional control (for example UltraLabel) and set the property TabWidth = 1. Please take a look at the attached vidoe and sample for more details and let me know if you have any questions

    Regards

    UltraDockManagerWithSingleTab.zip
Children
No Data