Paul,
The Docking Windows implementation does not have a direct way for programmatically changing the selection in a tabbed docking group. However, you can do this by directly accessing the internal docking windows classes and changing the selected tab. The following code shows the approach,
// To activate the docking window tab representing the treeView1 control
Syncfusion.Windows.Forms.Tools.DockHost dhost = this.treeView1.Parent as Syncfusion.Windows.Forms.Tools.DockHost;
Syncfusion.Windows.Forms.Tools.DockHostController dhc = dhost.InternalController as Syncfusion.Windows.Forms.Tools.DockHostController;
// Verify that the control is docked as a tab group
if((dhc.ParentController != null) && (dhc.ParentController is Syncfusion.Windows.Forms.Tools.DockTabController))
{ Syncfusion.Windows.Forms.Tools.DockTabController dtc = dhc.ParentController as Syncfusion.Windows.Forms.Tools.DockTabController;
Syncfusion.Windows.Forms.Tools.DockTabControl tabcontrol = dtc.TabControl as Syncfusion.Windows.Forms.Tools.DockTabControl;
Syncfusion.Windows.Forms.Tools.DockTabPage activetab = tabcontrol.SelectedTab as Syncfusion.Windows.Forms.Tools.DockTabPage;
// Verify that the control is not the selected tab
if(activetab.dhcClient != dhc)
{
// Iterate tabpages and activate the treeview tab
foreach(Syncfusion.Windows.Forms.Tools.DockTabPage page in tabcontrol.TabPages)
{
if(page.dhcClient == dhc)
{
tabcontrol.SelectedTab = page;
break;
}
}
}
}
Prakash
Syncfusion, Inc.