ComponentOne Menus and Toolbars for WinForms
Menus and Toolbars for WinForms Task-Based Help / DockingTab Tasks / Displaying the Same Set of Controls on each DockingTabPage
In This Topic
    Displaying the Same Set of Controls on each DockingTabPage
    In This Topic

    To display the first set of controls on C1DockingTabPage for the rest of the C1DockingTabPages without duplicating them, perform the following steps:

    1. Add a panel to the first C1DockingTabPage and then set its Dock property to Fill so it spans the whole C1DockingTabPage.
    2. Add the controls on the panel.
    3. In the SelectedIndexChanging event handler move the panel from the previous docking tab page to the new one.

      To write code in Visual Basic

      Visual Basic
      Copy Code
      Me.dockingTab.SelectedTab.Controls.Add (myPanel)
      

      To write code in C#

      C#
      Copy Code
      this.dockingTab.SelectedTab.Controls.Add (myPanel);
      
    See Also